mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
More type fixes
Param ids and IO ids are now simple enums. Move some type info in one place, delete some type-info files Fix type debug Make audio layout an enum Mark more enums as enums in types so they show us with their names in the debug.
This commit is contained in:
parent
93a8747a44
commit
d26aecfef2
82 changed files with 869 additions and 1118 deletions
|
|
@ -240,7 +240,7 @@ static int make_nodes(struct data *data, const char *device)
|
|||
":", SPA_PROP_device, "s", device ? device : "hw:0",
|
||||
":", SPA_PROP_minLatency, "i", 64);
|
||||
|
||||
if ((res = spa_node_set_param(data->sink, SPA_ID_PARAM_Props, 0, props)) < 0)
|
||||
if ((res = spa_node_set_param(data->sink, SPA_PARAM_Props, 0, props)) < 0)
|
||||
printf("got set_props error %d\n", res);
|
||||
|
||||
if ((res = make_node(data, &data->source,
|
||||
|
|
@ -255,7 +255,7 @@ static int make_nodes(struct data *data, const char *device)
|
|||
0, SPA_ID_OBJECT_Props,
|
||||
":", SPA_PROP_live, "b", false);
|
||||
|
||||
if ((res = spa_node_set_param(data->source, SPA_ID_PARAM_Props, 0, props)) < 0)
|
||||
if ((res = spa_node_set_param(data->source, SPA_PARAM_Props, 0, props)) < 0)
|
||||
printf("got set_props error %d\n", res);
|
||||
return res;
|
||||
}
|
||||
|
|
@ -275,19 +275,19 @@ static int negotiate_formats(struct data *data)
|
|||
"I", SPA_MEDIA_TYPE_audio,
|
||||
"I", SPA_MEDIA_SUBTYPE_raw,
|
||||
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_S16,
|
||||
":", SPA_FORMAT_AUDIO_layout, "i", SPA_AUDIO_LAYOUT_INTERLEAVED,
|
||||
":", SPA_FORMAT_AUDIO_layout, "I", SPA_AUDIO_LAYOUT_INTERLEAVED,
|
||||
":", SPA_FORMAT_AUDIO_rate, "i", 44100,
|
||||
":", SPA_FORMAT_AUDIO_channels, "i", 2);
|
||||
|
||||
if ((res = spa_node_port_enum_params(data->sink,
|
||||
SPA_DIRECTION_INPUT, 0,
|
||||
SPA_ID_PARAM_EnumFormat, &state,
|
||||
SPA_PARAM_EnumFormat, &state,
|
||||
filter, &format, &b)) <= 0)
|
||||
return -EBADF;
|
||||
|
||||
if ((res = spa_node_port_set_param(data->sink,
|
||||
SPA_DIRECTION_INPUT, 0,
|
||||
SPA_ID_PARAM_Format, 0,
|
||||
SPA_PARAM_Format, 0,
|
||||
format)) < 0)
|
||||
return res;
|
||||
|
||||
|
|
@ -295,16 +295,16 @@ static int negotiate_formats(struct data *data)
|
|||
|
||||
spa_node_port_set_io(data->source,
|
||||
SPA_DIRECTION_OUTPUT, 0,
|
||||
SPA_ID_IO_Buffers,
|
||||
SPA_IO_Buffers,
|
||||
&data->source_sink_io[0], sizeof(data->source_sink_io[0]));
|
||||
spa_node_port_set_io(data->sink,
|
||||
SPA_DIRECTION_INPUT, 0,
|
||||
SPA_ID_IO_Buffers,
|
||||
SPA_IO_Buffers,
|
||||
&data->source_sink_io[0], sizeof(data->source_sink_io[0]));
|
||||
|
||||
if ((res = spa_node_port_set_param(data->source,
|
||||
SPA_DIRECTION_OUTPUT, 0,
|
||||
SPA_ID_PARAM_Format, 0,
|
||||
SPA_PARAM_Format, 0,
|
||||
format)) < 0)
|
||||
return res;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue