mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
Use types with known sizes where we can, easier to serialize
Add iterator for POD and use it to implement some demarshalling.
This commit is contained in:
parent
23d09d5b60
commit
f92b68c3c3
77 changed files with 839 additions and 695 deletions
|
|
@ -64,7 +64,7 @@ struct _SpaALSAMonitor {
|
|||
struct udev* udev;
|
||||
struct udev_monitor *umonitor;
|
||||
struct udev_enumerate *enumerate;
|
||||
unsigned int index;
|
||||
uint32_t index;
|
||||
struct udev_list_entry *devices;
|
||||
|
||||
ALSAItem uitem;
|
||||
|
|
@ -107,7 +107,7 @@ static int
|
|||
fill_item (SpaALSAMonitor *this, ALSAItem *item, struct udev_device *udevice)
|
||||
{
|
||||
int err;
|
||||
unsigned int i;
|
||||
uint32_t i;
|
||||
const char *str;
|
||||
snd_pcm_t *hndl;
|
||||
char device[64];
|
||||
|
|
@ -319,7 +319,7 @@ spa_alsa_monitor_set_event_callback (SpaMonitor *monitor,
|
|||
static SpaResult
|
||||
spa_alsa_monitor_enum_items (SpaMonitor *monitor,
|
||||
SpaMonitorItem **item,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
SpaResult res;
|
||||
SpaALSAMonitor *this;
|
||||
|
|
@ -407,10 +407,10 @@ alsa_monitor_init (const SpaHandleFactory *factory,
|
|||
SpaHandle *handle,
|
||||
const SpaDict *info,
|
||||
const SpaSupport *support,
|
||||
unsigned int n_support)
|
||||
uint32_t n_support)
|
||||
{
|
||||
SpaALSAMonitor *this;
|
||||
unsigned int i;
|
||||
uint32_t i;
|
||||
|
||||
if (factory == NULL || handle == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -451,7 +451,7 @@ static const SpaInterfaceInfo alsa_monitor_interfaces[] =
|
|||
static SpaResult
|
||||
alsa_monitor_enum_interface_info (const SpaHandleFactory *factory,
|
||||
const SpaInterfaceInfo **info,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
if (factory == NULL || info == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
|
|||
|
|
@ -263,10 +263,10 @@ spa_alsa_sink_node_set_event_callback (SpaNode *node,
|
|||
|
||||
static SpaResult
|
||||
spa_alsa_sink_node_get_n_ports (SpaNode *node,
|
||||
unsigned int *n_input_ports,
|
||||
unsigned int *max_input_ports,
|
||||
unsigned int *n_output_ports,
|
||||
unsigned int *max_output_ports)
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
uint32_t *n_output_ports,
|
||||
uint32_t *max_output_ports)
|
||||
{
|
||||
if (node == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -285,9 +285,9 @@ spa_alsa_sink_node_get_n_ports (SpaNode *node,
|
|||
|
||||
static SpaResult
|
||||
spa_alsa_sink_node_get_port_ids (SpaNode *node,
|
||||
unsigned int n_input_ports,
|
||||
uint32_t n_input_ports,
|
||||
uint32_t *input_ids,
|
||||
unsigned int n_output_ports,
|
||||
uint32_t n_output_ports,
|
||||
uint32_t *output_ids)
|
||||
{
|
||||
if (node == NULL)
|
||||
|
|
@ -322,7 +322,7 @@ spa_alsa_sink_node_port_enum_formats (SpaNode *node,
|
|||
uint32_t port_id,
|
||||
SpaFormat **format,
|
||||
const SpaFormat *filter,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
SpaALSASink *this;
|
||||
SpaResult res;
|
||||
|
|
@ -795,10 +795,10 @@ alsa_sink_init (const SpaHandleFactory *factory,
|
|||
SpaHandle *handle,
|
||||
const SpaDict *info,
|
||||
const SpaSupport *support,
|
||||
unsigned int n_support)
|
||||
uint32_t n_support)
|
||||
{
|
||||
SpaALSASink *this;
|
||||
unsigned int i;
|
||||
uint32_t i;
|
||||
|
||||
if (factory == NULL || handle == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -849,7 +849,7 @@ static const SpaInterfaceInfo alsa_sink_interfaces[] =
|
|||
static SpaResult
|
||||
alsa_sink_enum_interface_info (const SpaHandleFactory *factory,
|
||||
const SpaInterfaceInfo **info,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
if (factory == NULL || info == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
|
|||
|
|
@ -298,10 +298,10 @@ spa_alsa_source_node_set_event_callback (SpaNode *node,
|
|||
|
||||
static SpaResult
|
||||
spa_alsa_source_node_get_n_ports (SpaNode *node,
|
||||
unsigned int *n_input_ports,
|
||||
unsigned int *max_input_ports,
|
||||
unsigned int *n_output_ports,
|
||||
unsigned int *max_output_ports)
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
uint32_t *n_output_ports,
|
||||
uint32_t *max_output_ports)
|
||||
{
|
||||
if (node == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -320,9 +320,9 @@ spa_alsa_source_node_get_n_ports (SpaNode *node,
|
|||
|
||||
static SpaResult
|
||||
spa_alsa_source_node_get_port_ids (SpaNode *node,
|
||||
unsigned int n_input_ports,
|
||||
uint32_t n_input_ports,
|
||||
uint32_t *input_ids,
|
||||
unsigned int n_output_ports,
|
||||
uint32_t n_output_ports,
|
||||
uint32_t *output_ids)
|
||||
{
|
||||
if (node == NULL)
|
||||
|
|
@ -357,7 +357,7 @@ spa_alsa_source_node_port_enum_formats (SpaNode *node,
|
|||
uint32_t port_id,
|
||||
SpaFormat **format,
|
||||
const SpaFormat *filter,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
SpaALSASource *this;
|
||||
SpaResult res;
|
||||
|
|
@ -859,10 +859,10 @@ alsa_source_init (const SpaHandleFactory *factory,
|
|||
SpaHandle *handle,
|
||||
const SpaDict *info,
|
||||
const SpaSupport *support,
|
||||
unsigned int n_support)
|
||||
uint32_t n_support)
|
||||
{
|
||||
SpaALSASource *this;
|
||||
unsigned int i;
|
||||
uint32_t i;
|
||||
|
||||
if (factory == NULL || handle == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -917,7 +917,7 @@ static const SpaInterfaceInfo alsa_source_interfaces[] =
|
|||
static SpaResult
|
||||
alsa_source_enum_interface_info (const SpaHandleFactory *factory,
|
||||
const SpaInterfaceInfo **info,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
if (factory == NULL || info == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ pull_frames_ringbuffer (SpaALSAState *state,
|
|||
avail = spa_ringbuffer_get_read_areas (&b->rb->ringbuffer, areas);
|
||||
size = SPA_MIN (avail, frames * state->frame_size);
|
||||
|
||||
spa_log_debug (state->log, "%zd %zd %zd %zd %zd %zd",
|
||||
spa_log_debug (state->log, "%u %u %u %u %zd %zd",
|
||||
areas[0].offset, areas[0].len,
|
||||
areas[1].offset, areas[1].len, offset, size);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ extern const SpaHandleFactory spa_alsa_monitor_factory;
|
|||
|
||||
SpaResult
|
||||
spa_enum_handle_factory (const SpaHandleFactory **factory,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
if (factory == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue