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:
Wim Taymans 2018-08-25 12:08:29 +02:00
parent 93a8747a44
commit d26aecfef2
82 changed files with 869 additions and 1118 deletions

View file

@ -163,8 +163,8 @@ fill_item(struct impl *this, snd_ctl_card_info_t *card_info,
spa_pod_builder_add(builder,
"<", 0, SPA_ID_OBJECT_MonitorItem,
":", SPA_MONITOR_ITEM_id, "s", id,
":", SPA_MONITOR_ITEM_flags, "i", SPA_MONITOR_ITEM_FLAG_NONE,
":", SPA_MONITOR_ITEM_state, "i", SPA_MONITOR_ITEM_STATE_AVAILABLE,
":", SPA_MONITOR_ITEM_flags, "I", SPA_MONITOR_ITEM_FLAG_NONE,
":", SPA_MONITOR_ITEM_state, "I", SPA_MONITOR_ITEM_STATE_AVAILABLE,
":", SPA_MONITOR_ITEM_name, "s", name,
":", SPA_MONITOR_ITEM_class, "s", klass,
":", SPA_MONITOR_ITEM_factory, "p", SPA_ID_INTERFACE_HandleFactory, factory,

View file

@ -63,10 +63,10 @@ static int impl_node_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_PropInfo,
SPA_ID_PARAM_Props };
uint32_t list[] = { SPA_PARAM_PropInfo,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -75,7 +75,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_PropInfo:
case SPA_PARAM_PropInfo:
{
struct props *p = &this->props;
@ -122,7 +122,7 @@ static int impl_node_enum_params(struct spa_node *node,
}
break;
}
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -162,7 +162,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
this = SPA_CONTAINER_OF(node, struct state, node);
if (id == SPA_ID_PARAM_Props) {
if (id == SPA_PARAM_Props) {
struct props *p = &this->props;
if (param == NULL) {
@ -318,13 +318,13 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta,
SPA_ID_PARAM_IO, };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta,
SPA_PARAM_IO, };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -333,10 +333,10 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
return spa_alsa_enum_format(this, index, filter, result, builder);
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if (!this->have_format)
return -EIO;
if (*index > 0)
@ -347,12 +347,12 @@ impl_node_port_enum_params(struct spa_node *node,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
":", SPA_FORMAT_AUDIO_layout, "i", this->current_format.info.raw.layout,
":", SPA_FORMAT_AUDIO_layout, "I", this->current_format.info.raw.layout,
":", SPA_FORMAT_AUDIO_rate, "i", this->current_format.info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "i", this->current_format.info.raw.channels);
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (!this->have_format)
return -EIO;
if (*index > 0)
@ -371,7 +371,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!this->have_format)
return -EIO;
@ -387,24 +387,24 @@ impl_node_port_enum_params(struct spa_node *node,
}
break;
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_ControlRange,
":", SPA_PARAM_IO_id, "I", SPA_IO_ControlRange,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_control_range));
break;
case 2:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Clock,
":", SPA_PARAM_IO_id, "I", SPA_IO_Clock,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_clock));
break;
default:
@ -486,7 +486,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(node, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -583,13 +583,13 @@ impl_node_port_set_io(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
switch (id) {
case SPA_ID_IO_Buffers:
case SPA_IO_Buffers:
this->io = data;
break;
case SPA_ID_IO_ControlRange:
case SPA_IO_ControlRange:
this->range = data;
break;
case SPA_ID_IO_Clock:
case SPA_IO_Clock:
this->clock = data;
break;
default:

View file

@ -67,10 +67,10 @@ static int impl_node_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_PropInfo,
SPA_ID_PARAM_Props, };
uint32_t list[] = { SPA_PARAM_PropInfo,
SPA_PARAM_Props, };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -79,7 +79,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_PropInfo:
case SPA_PARAM_PropInfo:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
@ -123,7 +123,7 @@ static int impl_node_enum_params(struct spa_node *node,
}
break;
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
@ -161,7 +161,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
this = SPA_CONTAINER_OF(node, struct state, node);
switch (id) {
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -319,11 +319,11 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
":", SPA_FORMAT_AUDIO_layout, "i", this->current_format.info.raw.layout,
":", SPA_FORMAT_AUDIO_layout, "I", this->current_format.info.raw.layout,
":", SPA_FORMAT_AUDIO_rate, "i", this->current_format.info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "i", this->current_format.info.raw.channels);
@ -356,12 +356,12 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -370,15 +370,15 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
return spa_alsa_enum_format(this, index, filter, result, builder);
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (!this->have_format)
return -EIO;
if (*index > 0)
@ -397,7 +397,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!this->have_format)
return -EIO;
@ -413,18 +413,18 @@ impl_node_port_enum_params(struct spa_node *node,
}
break;
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Clock,
":", SPA_PARAM_IO_id, "I", SPA_IO_Clock,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_clock));
break;
default:
@ -504,7 +504,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(node, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -599,13 +599,16 @@ impl_node_port_set_io(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
if (id == SPA_ID_IO_Buffers)
switch (id) {
case SPA_IO_Buffers:
this->io = data;
else if (id == SPA_ID_IO_Clock)
break;
case SPA_IO_Clock:
this->clock = data;
else
break;
default:
return -ENOENT;
}
return 0;
}

View file

@ -133,7 +133,7 @@ spa_alsa_enum_format(struct state *state, uint32_t *index,
snd_pcm_hw_params_alloca(&params);
CHECK(snd_pcm_hw_params_any(hndl, params), "Broken configuration: no configurations available");
spa_pod_builder_push_object(&b, SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format);
spa_pod_builder_push_object(&b, SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format);
spa_pod_builder_add(&b,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw, 0);
@ -150,8 +150,8 @@ spa_alsa_enum_format(struct state *state, uint32_t *index,
if (snd_pcm_format_mask_test(fmask, fi->format)) {
if (j++ == 0)
spa_pod_builder_id(&b, fi->spa_format);
spa_pod_builder_id(&b, fi->spa_format);
spa_pod_builder_enum(&b, fi->spa_format);
spa_pod_builder_enum(&b, fi->spa_format);
}
}
if (j > 1)
@ -167,13 +167,13 @@ spa_alsa_enum_format(struct state *state, uint32_t *index,
j = 0;
if (snd_pcm_access_mask_test(amask, SND_PCM_ACCESS_MMAP_INTERLEAVED)) {
if (j++ == 0)
spa_pod_builder_int(&b, SPA_AUDIO_LAYOUT_INTERLEAVED);
spa_pod_builder_int(&b, SPA_AUDIO_LAYOUT_INTERLEAVED);
spa_pod_builder_enum(&b, SPA_AUDIO_LAYOUT_INTERLEAVED);
spa_pod_builder_enum(&b, SPA_AUDIO_LAYOUT_INTERLEAVED);
}
if (snd_pcm_access_mask_test(amask, SND_PCM_ACCESS_MMAP_NONINTERLEAVED)) {
if (j++ == 0)
spa_pod_builder_int(&b, SPA_AUDIO_LAYOUT_NON_INTERLEAVED);
spa_pod_builder_int(&b, SPA_AUDIO_LAYOUT_NON_INTERLEAVED);
spa_pod_builder_enum(&b, SPA_AUDIO_LAYOUT_NON_INTERLEAVED);
spa_pod_builder_enum(&b, SPA_AUDIO_LAYOUT_NON_INTERLEAVED);
}
if (j > 1)
prop->body.flags |= SPA_POD_PROP_RANGE_ENUM | SPA_POD_PROP_FLAG_UNSET;

View file

@ -34,9 +34,7 @@ extern "C" {
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/buffers.h>
#include <spa/param/io.h>
#include <spa/param/meta.h>
#include <spa/param/param.h>
#include <spa/param/audio/format-utils.h>
#define DEFAULT_RATE 48000

View file

@ -27,9 +27,7 @@
#include <spa/buffer/alloc.h>
#include <spa/node/io.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/io.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#include <spa/debug/pod.h>
#include <spa/debug/types.h>
@ -124,14 +122,14 @@ static int make_link(struct impl *this,
&l->out_info);
spa_node_port_set_io(out_node,
SPA_DIRECTION_OUTPUT, out_port,
SPA_ID_IO_Buffers,
SPA_IO_Buffers,
&l->io, sizeof(l->io));
spa_node_port_get_info(in_node,
SPA_DIRECTION_INPUT, in_port,
&l->in_info);
spa_node_port_set_io(in_node,
SPA_DIRECTION_INPUT, in_port,
SPA_ID_IO_Buffers,
SPA_IO_Buffers,
&l->io, sizeof(l->io));
return 0;
}
@ -140,10 +138,10 @@ static void clean_link(struct impl *this, struct link *link)
{
spa_node_port_set_param(link->in_node,
SPA_DIRECTION_INPUT, link->in_port,
SPA_ID_PARAM_Format, 0, NULL);
SPA_PARAM_Format, 0, NULL);
spa_node_port_set_param(link->out_node,
SPA_DIRECTION_OUTPUT, link->out_port,
SPA_ID_PARAM_Format, 0, NULL);
SPA_PARAM_Format, 0, NULL);
if (link->buffers)
free(link->buffers);
link->buffers = NULL;
@ -197,20 +195,20 @@ static int negotiate_link_format(struct impl *this, struct link *link)
filter = NULL;
if ((res = spa_node_port_enum_params(link->out_node,
SPA_DIRECTION_OUTPUT, link->out_port,
SPA_ID_PARAM_EnumFormat, &state,
SPA_PARAM_EnumFormat, &state,
filter, &format, &b)) <= 0) {
debug_params(this, link->out_node, SPA_DIRECTION_OUTPUT, link->out_port,
SPA_ID_PARAM_EnumFormat, filter);
SPA_PARAM_EnumFormat, filter);
return -ENOTSUP;
}
filter = format;
state = 0;
if ((res = spa_node_port_enum_params(link->in_node,
SPA_DIRECTION_INPUT, link->in_port,
SPA_ID_PARAM_EnumFormat, &state,
SPA_PARAM_EnumFormat, &state,
filter, &format, &b)) <= 0) {
debug_params(this, link->in_node, SPA_DIRECTION_INPUT, link->in_port,
SPA_ID_PARAM_EnumFormat, filter);
SPA_PARAM_EnumFormat, filter);
return -ENOTSUP;
}
filter = format;
@ -219,13 +217,13 @@ static int negotiate_link_format(struct impl *this, struct link *link)
if ((res = spa_node_port_set_param(link->out_node,
SPA_DIRECTION_OUTPUT, link->out_port,
SPA_ID_PARAM_Format, 0,
SPA_PARAM_Format, 0,
filter)) < 0)
return res;
if ((res = spa_node_port_set_param(link->in_node,
SPA_DIRECTION_INPUT, link->in_port,
SPA_ID_PARAM_Format, 0,
SPA_PARAM_Format, 0,
filter)) < 0)
return res;
@ -281,19 +279,19 @@ static int negotiate_link_buffers(struct impl *this, struct link *link)
state = 0;
if ((res = spa_node_port_enum_params(link->in_node,
SPA_DIRECTION_INPUT, link->in_port,
SPA_ID_PARAM_Buffers, &state,
SPA_PARAM_Buffers, &state,
param, &param, &b)) <= 0) {
debug_params(this, link->out_node, SPA_DIRECTION_OUTPUT, link->out_port,
SPA_ID_PARAM_Buffers, param);
SPA_PARAM_Buffers, param);
return -ENOTSUP;
}
state = 0;
if ((res = spa_node_port_enum_params(link->out_node,
SPA_DIRECTION_OUTPUT, link->out_port,
SPA_ID_PARAM_Buffers, &state,
SPA_PARAM_Buffers, &state,
param, &param, &b)) <= 0) {
debug_params(this, link->in_node, SPA_DIRECTION_INPUT, link->in_port,
SPA_ID_PARAM_Buffers, param);
SPA_PARAM_Buffers, param);
return -ENOTSUP;
}
@ -564,13 +562,13 @@ impl_node_port_enum_params(struct spa_node *node,
switch (id) {
next:
case SPA_ID_PARAM_PropInfo:
case SPA_PARAM_PropInfo:
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (*index) {
case 0:
param = spa_pod_builder_object(builder,
id, SPA_ID_PARAM_PropInfo,
id, SPA_ID_OBJECT_PropInfo,
":", SPA_PROP_INFO_id, "I", SPA_PROP_volume,
":", SPA_PROP_INFO_type, "fru", 1.0,
SPA_POD_PROP_MIN_MAX(0.0, 10.0));
@ -655,7 +653,7 @@ impl_node_port_set_io(struct spa_node *node,
spa_log_debug(this->log, "set io %d %d %d", id, direction, port_id);
if (id == SPA_ID_IO_ControlRange)
if (id == SPA_IO_ControlRange)
res = spa_node_port_set_io(this->resample, direction, 0, id, data, size);
// else if (id == t->io_prop_volume)
// res = spa_node_port_set_io(this->channelmix, direction, 0, id, data, size);

View file

@ -26,9 +26,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/io.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#define NAME "channelmix"
@ -314,21 +312,21 @@ static int port_enum_formats(struct spa_node *node,
case 0:
if (other->have_format) {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
":", SPA_FORMAT_AUDIO_layout, "i", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_layout, "I", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_rate, "i", other->format.info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "iru", 2,
SPA_POD_PROP_MIN_MAX(1, INT32_MAX));
} else {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
":", SPA_FORMAT_AUDIO_layout, "i", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_layout, "I", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_rate, "iru", DEFAULT_RATE,
SPA_POD_PROP_MIN_MAX(1, INT32_MAX),
":", SPA_FORMAT_AUDIO_channels, "iru", DEFAULT_CHANNELS,
@ -356,11 +354,11 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", port->format.info.raw.format,
":", SPA_FORMAT_AUDIO_layout, "i", port->format.info.raw.layout,
":", SPA_FORMAT_AUDIO_layout, "I", port->format.info.raw.layout,
":", SPA_FORMAT_AUDIO_rate, "i", port->format.info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "i", port->format.info.raw.channels);
@ -397,13 +395,13 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta,
SPA_ID_PARAM_IO };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -412,17 +410,17 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
{
uint32_t buffers, size;
@ -450,7 +448,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
}
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!port->have_format)
return -EIO;
@ -466,12 +464,12 @@ impl_node_port_enum_params(struct spa_node *node,
}
break;
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
default:
@ -563,7 +561,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(node, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -656,7 +654,7 @@ impl_node_port_set_io(struct spa_node *node,
port = GET_PORT(this, direction, port_id);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
port->io = data;
// else if (id == t->io_prop_volume)
// port->control.volume = data;

View file

@ -26,9 +26,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/io.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#include <spa/debug/types.h>
@ -423,21 +421,21 @@ static int port_enum_formats(struct spa_node *node,
case 0:
if (other->info.raw.channels > 0) {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", other->info.raw.format,
SPA_POD_PROP_ENUM(3, other->info.raw.format,
SPA_AUDIO_FORMAT_F32,
SPA_AUDIO_FORMAT_F32_OE),
":", SPA_FORMAT_AUDIO_layout, "ieu", other->info.raw.layout,
":", SPA_FORMAT_AUDIO_layout, "Ieu", other->info.raw.layout,
SPA_POD_PROP_ENUM(2, SPA_AUDIO_LAYOUT_INTERLEAVED,
SPA_AUDIO_LAYOUT_NON_INTERLEAVED),
":", SPA_FORMAT_AUDIO_rate, "i", other->info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "i", other->info.raw.channels);
} else {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_S16,
@ -452,7 +450,7 @@ static int port_enum_formats(struct spa_node *node,
SPA_AUDIO_FORMAT_S24_OE,
SPA_AUDIO_FORMAT_S24_32,
SPA_AUDIO_FORMAT_S24_32_OE),
":", SPA_FORMAT_AUDIO_layout, "ieu", SPA_AUDIO_LAYOUT_INTERLEAVED,
":", SPA_FORMAT_AUDIO_layout, "Ieu", SPA_AUDIO_LAYOUT_INTERLEAVED,
SPA_POD_PROP_ENUM(2, SPA_AUDIO_LAYOUT_INTERLEAVED,
SPA_AUDIO_LAYOUT_NON_INTERLEAVED),
":", SPA_FORMAT_AUDIO_rate, "iru", DEFAULT_RATE,
@ -482,11 +480,11 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", port->format.info.raw.format,
":", SPA_FORMAT_AUDIO_layout, "i", port->format.info.raw.layout,
":", SPA_FORMAT_AUDIO_layout, "I", port->format.info.raw.layout,
":", SPA_FORMAT_AUDIO_rate, "i", port->format.info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "i", port->format.info.raw.channels);
@ -524,13 +522,13 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta,
SPA_ID_PARAM_IO };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -539,17 +537,17 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
{
uint32_t buffers, size;
const char *size_fmt;
@ -580,7 +578,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
}
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!port->have_format)
return -EIO;
@ -596,12 +594,12 @@ impl_node_port_enum_params(struct spa_node *node,
}
break;
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
default:
@ -737,7 +735,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
switch (id) {
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
return port_set_format(node, direction, port_id, flags, param);
default:
return -ENOENT;
@ -836,10 +834,10 @@ impl_node_port_set_io(struct spa_node *node,
this, direction, port_id, id, data);
switch (id) {
case SPA_ID_IO_Buffers:
case SPA_IO_Buffers:
port->io = data;
break;
case SPA_ID_IO_ControlRange:
case SPA_IO_ControlRange:
port->ctrl = data;
break;
default:

View file

@ -27,9 +27,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/io.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#include <spa/debug/types.h>
@ -321,7 +319,7 @@ static int port_enum_formats(struct spa_node *node,
if (direction == SPA_DIRECTION_OUTPUT) {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_F32,
@ -337,7 +335,7 @@ static int port_enum_formats(struct spa_node *node,
SPA_AUDIO_FORMAT_S16,
SPA_AUDIO_FORMAT_S16_OE,
SPA_AUDIO_FORMAT_U8),
":", SPA_FORMAT_AUDIO_layout, "ieu", SPA_AUDIO_LAYOUT_INTERLEAVED,
":", SPA_FORMAT_AUDIO_layout, "Ieu", SPA_AUDIO_LAYOUT_INTERLEAVED,
SPA_POD_PROP_ENUM(2, SPA_AUDIO_LAYOUT_INTERLEAVED,
SPA_AUDIO_LAYOUT_NON_INTERLEAVED),
":", SPA_FORMAT_AUDIO_rate, rspec, rate,
@ -346,11 +344,11 @@ static int port_enum_formats(struct spa_node *node,
}
else {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
":", SPA_FORMAT_AUDIO_layout, "i", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_layout, "I", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_rate, rspec, rate,
SPA_POD_PROP_MIN_MAX(1, INT32_MAX),
":", SPA_FORMAT_AUDIO_channels, "i", 1);
@ -377,11 +375,11 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", port->format.info.raw.format,
":", SPA_FORMAT_AUDIO_layout, "i", port->format.info.raw.layout,
":", SPA_FORMAT_AUDIO_layout, "I", port->format.info.raw.layout,
":", SPA_FORMAT_AUDIO_rate, "i", port->format.info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "i", port->format.info.raw.channels);
@ -419,13 +417,13 @@ impl_node_port_enum_params(struct spa_node *node,
spa_log_debug(this->log, NAME " %p: enum param %d %d", this, id, this->have_format);
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta,
SPA_ID_PARAM_IO, };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta,
SPA_PARAM_IO, };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -433,15 +431,15 @@ impl_node_port_enum_params(struct spa_node *node,
else
return 0;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (!port->have_format)
return -EIO;
if (*index > 0)
@ -457,7 +455,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_stride, "i", port->stride,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!port->have_format)
return -EIO;
@ -472,12 +470,12 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
}
break;
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
default:
@ -673,7 +671,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
switch (id) {
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
return port_set_format(node, direction, port_id, flags, param);
default:
return -ENOENT;
@ -786,10 +784,10 @@ impl_node_port_set_io(struct spa_node *node,
port = GET_PORT(this, direction, port_id);
switch (id) {
case SPA_ID_IO_Buffers:
case SPA_IO_Buffers:
port->io = data;
break;
case SPA_ID_IO_ControlRange:
case SPA_IO_ControlRange:
port->ctrl = data;
break;
default:

View file

@ -28,9 +28,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/io.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#define NAME "resample"
@ -284,21 +282,21 @@ static int port_enum_formats(struct spa_node *node,
case 0:
if (other->have_format) {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
":", SPA_FORMAT_AUDIO_layout, "i", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_layout, "I", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_rate, "iru", other->format.info.raw.rate,
SPA_POD_PROP_MIN_MAX(1, INT32_MAX),
":", SPA_FORMAT_AUDIO_channels, "i", other->format.info.raw.channels);
} else {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
":", SPA_FORMAT_AUDIO_layout, "i", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_layout, "I", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_rate, "iru", DEFAULT_RATE,
SPA_POD_PROP_MIN_MAX(1, INT32_MAX),
":", SPA_FORMAT_AUDIO_channels, "iru", DEFAULT_CHANNELS,
@ -326,11 +324,11 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", port->format.info.raw.format,
":", SPA_FORMAT_AUDIO_layout, "i", port->format.info.raw.layout,
":", SPA_FORMAT_AUDIO_layout, "I", port->format.info.raw.layout,
":", SPA_FORMAT_AUDIO_rate, "i", port->format.info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "i", port->format.info.raw.channels);
@ -367,13 +365,13 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta,
SPA_ID_PARAM_IO };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -382,15 +380,15 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
{
uint32_t buffers, size;
@ -419,7 +417,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
}
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!port->have_format)
return -EIO;
@ -434,12 +432,12 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
}
break;
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
default:
@ -530,7 +528,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(node, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -625,9 +623,9 @@ impl_node_port_set_io(struct spa_node *node,
port = GET_PORT(this, direction, port_id);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
port->io = data;
else if (id == SPA_ID_IO_ControlRange)
else if (id == SPA_IO_ControlRange)
port->ctrl = data;
else
return -ENOENT;

View file

@ -27,9 +27,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/io.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#include <spa/debug/types.h>
@ -321,7 +319,7 @@ static int port_enum_formats(struct spa_node *node,
if (direction == SPA_DIRECTION_INPUT) {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_F32,
@ -337,7 +335,7 @@ static int port_enum_formats(struct spa_node *node,
SPA_AUDIO_FORMAT_S16,
SPA_AUDIO_FORMAT_S16_OE,
SPA_AUDIO_FORMAT_U8),
":", SPA_FORMAT_AUDIO_layout, "ieu", SPA_AUDIO_LAYOUT_INTERLEAVED,
":", SPA_FORMAT_AUDIO_layout, "Ieu", SPA_AUDIO_LAYOUT_INTERLEAVED,
SPA_POD_PROP_ENUM(2, SPA_AUDIO_LAYOUT_INTERLEAVED,
SPA_AUDIO_LAYOUT_NON_INTERLEAVED),
":", SPA_FORMAT_AUDIO_rate, rspec, rate,
@ -346,11 +344,11 @@ static int port_enum_formats(struct spa_node *node,
}
else {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
":", SPA_FORMAT_AUDIO_layout, "i", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_layout, "I", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", SPA_FORMAT_AUDIO_rate, rspec, rate,
SPA_POD_PROP_MIN_MAX(1, INT32_MAX),
":", SPA_FORMAT_AUDIO_channels, "i", 1);
@ -377,11 +375,11 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", port->format.info.raw.format,
":", SPA_FORMAT_AUDIO_layout, "i", port->format.info.raw.layout,
":", SPA_FORMAT_AUDIO_layout, "I", port->format.info.raw.layout,
":", SPA_FORMAT_AUDIO_rate, "i", port->format.info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "i", port->format.info.raw.channels);
@ -419,13 +417,13 @@ impl_node_port_enum_params(struct spa_node *node,
spa_log_debug(this->log, NAME " %p: enum param %d %d", this, id, this->have_format);
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta,
SPA_ID_PARAM_IO };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -434,15 +432,15 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (!port->have_format)
return -EIO;
if (*index > 0)
@ -459,7 +457,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!port->have_format)
return -EIO;
@ -474,12 +472,12 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
}
break;
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
default:
@ -675,7 +673,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
switch (id) {
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
return port_set_format(node, direction, port_id, flags, param);
default:
return -ENOENT;
@ -787,9 +785,9 @@ impl_node_port_set_io(struct spa_node *node,
port = GET_PORT(this, direction, port_id);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
port->io = data;
else if (id == SPA_ID_IO_ControlRange)
else if (id == SPA_IO_ControlRange)
port->ctrl = data;
else
return -ENOENT;

View file

@ -26,9 +26,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/io.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#include "mix-ops.h"
@ -329,7 +327,7 @@ static int port_enum_formats(struct spa_node *node,
case 0:
if (this->have_format) {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->format.info.raw.format,
@ -337,7 +335,7 @@ static int port_enum_formats(struct spa_node *node,
":", SPA_FORMAT_AUDIO_channels, "i", this->format.info.raw.channels);
} else {
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_S16,
@ -370,7 +368,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->format.info.raw.format,
@ -409,13 +407,13 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta,
SPA_ID_PARAM_IO, };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta,
SPA_PARAM_IO, };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -424,15 +422,15 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (!port->have_format)
return -EIO;
if (*index > 0)
@ -448,7 +446,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_stride, "i", 0,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!port->have_format)
return -EIO;
@ -463,18 +461,18 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
}
break;
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_ControlRange,
":", SPA_PARAM_IO_id, "I", SPA_IO_ControlRange,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_control_range));
break;
default:
@ -615,7 +613,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -703,9 +701,9 @@ impl_node_port_set_io(struct spa_node *node,
port = GET_PORT(this, direction, port_id);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
port->io = data;
else if (id == SPA_ID_IO_ControlRange)
else if (id == SPA_IO_ControlRange)
port->io_range = data;
#if 0
else if (id == t->io_prop_volume && direction == SPA_DIRECTION_INPUT)

View file

@ -30,9 +30,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/io.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#define NAME "audiotestsrc"
@ -144,10 +142,10 @@ static int impl_node_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_PropInfo,
SPA_ID_PARAM_Props };
uint32_t list[] = { SPA_PARAM_PropInfo,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -156,7 +154,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_PropInfo:
case SPA_PARAM_PropInfo:
{
struct props *p = &this->props;
@ -199,7 +197,7 @@ static int impl_node_enum_params(struct spa_node *node,
}
break;
}
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -238,7 +236,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
this = SPA_CONTAINER_OF(node, struct impl, node);
if (id == SPA_ID_PARAM_Props) {
if (id == SPA_PARAM_Props) {
struct props *p = &this->props;
if (param == NULL) {
@ -526,7 +524,7 @@ port_enum_formats(struct impl *this,
switch (*index) {
case 0:
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_S16,
@ -559,7 +557,7 @@ port_get_format(struct impl *this,
return 0;
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
@ -595,13 +593,13 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta,
SPA_ID_PARAM_IO, };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta,
SPA_PARAM_IO, };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -610,16 +608,16 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(this, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(this, direction, port_id, index, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (!this->have_format)
return -EIO;
if (*index > 0)
@ -635,7 +633,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_stride, "i", 0,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!this->have_format)
return -EIO;
@ -650,18 +648,18 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
}
break;
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_ControlRange,
":", SPA_PARAM_IO_id, "I", SPA_IO_ControlRange,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_control_range));
break;
default:
@ -794,7 +792,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format)
if (id == SPA_PARAM_Format)
return port_set_format(this, direction, port_id, flags, param);
return -ENOENT;
@ -882,9 +880,9 @@ impl_node_port_set_io(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
this->io = data;
else if (id == SPA_ID_IO_ControlRange)
else if (id == SPA_IO_ControlRange)
this->io_range = data;
#if 0
else if (id == t->io_prop_wave) {

View file

@ -30,8 +30,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/param.h>
#include <spa/param/audio/format.h>
#include <spa/param/audio/format-utils.h>
#include <spa/pod/filter.h>
@ -161,10 +160,10 @@ static int impl_node_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_PropInfo,
SPA_ID_PARAM_Props };
uint32_t list[] = { SPA_PARAM_PropInfo,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -173,7 +172,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_PropInfo:
case SPA_PARAM_PropInfo:
{
struct props *p = &this->props;
@ -199,7 +198,7 @@ static int impl_node_enum_params(struct spa_node *node,
}
break;
}
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -237,7 +236,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
this = SPA_CONTAINER_OF(node, struct impl, node);
switch (id) {
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -939,12 +938,12 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -953,7 +952,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if (*index > 0)
return 0;
@ -971,7 +970,7 @@ impl_node_port_enum_params(struct spa_node *node,
"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", rate,
":", SPA_FORMAT_AUDIO_channels, "i", channels);
}
@ -979,7 +978,7 @@ impl_node_port_enum_params(struct spa_node *node,
return -EIO;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if (!this->have_format)
return -EIO;
if (*index > 0)
@ -990,12 +989,12 @@ impl_node_port_enum_params(struct spa_node *node,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
":", SPA_FORMAT_AUDIO_layout, "i", this->current_format.info.raw.layout,
":", SPA_FORMAT_AUDIO_layout, "I", this->current_format.info.raw.layout,
":", SPA_FORMAT_AUDIO_rate, "i", this->current_format.info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "i", this->current_format.info.raw.channels);
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (!this->have_format)
return -EIO;
if (*index > 0)
@ -1014,7 +1013,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!this->have_format)
return -EIO;
@ -1103,7 +1102,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(node, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -1194,10 +1193,10 @@ impl_node_port_set_io(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
switch (id) {
case SPA_ID_IO_Buffers:
case SPA_IO_Buffers:
this->io = data;
break;
case SPA_ID_IO_ControlRange:
case SPA_IO_ControlRange:
this->range = data;
break;
default:

View file

@ -72,8 +72,8 @@ static void fill_item(struct spa_bt_monitor *this, struct spa_bt_transport *tran
spa_pod_builder_add(builder,
"<", 0, SPA_ID_OBJECT_MonitorItem,
":", SPA_MONITOR_ITEM_id, "s", transport->path,
":", SPA_MONITOR_ITEM_flags, "i", SPA_MONITOR_ITEM_FLAG_NONE,
":", SPA_MONITOR_ITEM_state, "i", SPA_MONITOR_ITEM_STATE_AVAILABLE,
":", SPA_MONITOR_ITEM_flags, "I", SPA_MONITOR_ITEM_FLAG_NONE,
":", SPA_MONITOR_ITEM_state, "I", SPA_MONITOR_ITEM_STATE_AVAILABLE,
":", SPA_MONITOR_ITEM_name, "s", transport->path,
":", SPA_MONITOR_ITEM_class, "s", "Adapter/Bluetooth",
":", SPA_MONITOR_ITEM_factory, "p", SPA_ID_INTERFACE_HandleFactory, &spa_a2dp_sink_factory,

View file

@ -269,10 +269,10 @@ spa_ffmpeg_dec_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -281,12 +281,12 @@ spa_ffmpeg_dec_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
@ -352,7 +352,7 @@ spa_ffmpeg_dec_node_port_set_param(struct spa_node *node,
uint32_t id, uint32_t flags,
const struct spa_pod *param)
{
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -407,7 +407,7 @@ spa_ffmpeg_dec_node_port_set_io(struct spa_node *node,
port = GET_PORT(this, direction, port_id);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
port->io = data;
else
return -ENOENT;

View file

@ -258,10 +258,10 @@ spa_ffmpeg_enc_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -270,12 +270,12 @@ spa_ffmpeg_enc_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
@ -332,7 +332,7 @@ spa_ffmpeg_enc_node_port_set_param(struct spa_node *node,
uint32_t id, uint32_t flags,
const struct spa_pod *param)
{
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -386,7 +386,7 @@ spa_ffmpeg_enc_node_port_set_io(struct spa_node *node,
port = GET_PORT(this, direction, port_id);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
port->io = data;
else
return -ENOENT;

View file

@ -29,8 +29,7 @@
#include <spa/utils/list.h>
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/param.h>
#include <spa/param/format.h>
#include <spa/pod/parser.h>
#include <spa/pod/filter.h>
@ -112,15 +111,15 @@ static int impl_node_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
if (*index > 0)
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamList,
":", SPA_PARAM_LIST_id, "I", SPA_ID_PARAM_Props);
":", SPA_PARAM_LIST_id, "I", SPA_PARAM_Props);
break;
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
if (*index > 0)
return 0;
@ -150,7 +149,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
this = SPA_CONTAINER_OF(node, struct impl, node);
switch (id) {
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
if (param == NULL) {
reset_props(this, &this->props);
return 0;
@ -453,12 +452,12 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -467,15 +466,15 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (*index > 0)
return 0;
@ -488,7 +487,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_stride, "i", 1,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
@ -553,7 +552,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(node, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -640,7 +639,7 @@ impl_node_port_set_io(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
this->io = data;
else
return -ENOENT;

View file

@ -29,8 +29,7 @@
#include <spa/utils/list.h>
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/param.h>
#include <spa/param/format.h>
#include <spa/pod/parser.h>
#include <spa/pod/filter.h>
@ -117,16 +116,16 @@ static int impl_node_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
if (*index > 0)
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamList,
":", SPA_PARAM_LIST_id, "I", SPA_ID_PARAM_Props);
":", SPA_PARAM_LIST_id, "I", SPA_PARAM_Props);
break;
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -162,7 +161,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
this = SPA_CONTAINER_OF(node, struct impl, node);
switch (id) {
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -469,12 +468,12 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -483,15 +482,15 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (*index > 0)
return 0;
@ -504,7 +503,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_stride, "i", 1,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
@ -569,7 +568,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(node, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -658,7 +657,7 @@ impl_node_port_set_io(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
this->io = data;
else
return -ENOENT;

View file

@ -100,8 +100,8 @@ static void fill_item(struct impl *this, struct item *item, struct udev_device *
spa_pod_builder_add(builder,
"<", 0, SPA_ID_OBJECT_MonitorItem,
":", SPA_MONITOR_ITEM_id, "s", udev_device_get_syspath(item->udevice),
":", SPA_MONITOR_ITEM_flags, "i", SPA_MONITOR_ITEM_FLAG_NONE,
":", SPA_MONITOR_ITEM_state, "i", SPA_MONITOR_ITEM_STATE_AVAILABLE,
":", SPA_MONITOR_ITEM_flags, "I", SPA_MONITOR_ITEM_FLAG_NONE,
":", SPA_MONITOR_ITEM_state, "I", SPA_MONITOR_ITEM_STATE_AVAILABLE,
":", SPA_MONITOR_ITEM_name, "s", name,
":", SPA_MONITOR_ITEM_class, "s", "Video/Source",
":", SPA_MONITOR_ITEM_factory, "p", SPA_ID_INTERFACE_HandleFactory, &spa_v4l2_source_factory,

View file

@ -30,9 +30,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/video/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/io.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#define NAME "v4l2-source"
@ -158,10 +156,10 @@ static int impl_node_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_PropInfo,
SPA_ID_PARAM_Props };
uint32_t list[] = { SPA_PARAM_PropInfo,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -170,7 +168,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_PropInfo:
case SPA_PARAM_PropInfo:
{
struct props *p = &this->props;
@ -201,7 +199,7 @@ static int impl_node_enum_params(struct spa_node *node,
}
break;
}
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -241,7 +239,7 @@ static int impl_node_set_param(struct spa_node *node,
this = SPA_CONTAINER_OF(node, struct impl, node);
switch (id) {
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -394,7 +392,7 @@ static int port_get_format(struct spa_node *node,
if (*index > 0)
return 0;
spa_pod_builder_push_object(builder, SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format);
spa_pod_builder_push_object(builder, SPA_PARAM_Format, SPA_ID_OBJECT_Format);
spa_pod_builder_add(builder,
"I", port->current_format.media_type,
@ -457,14 +455,14 @@ static int impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_PropInfo,
SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta,
SPA_ID_PARAM_IO };
uint32_t list[] = { SPA_PARAM_PropInfo,
SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -473,17 +471,17 @@ static int impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_PropInfo:
case SPA_PARAM_PropInfo:
return spa_v4l2_enum_controls(this, index, filter, result, builder);
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
return spa_v4l2_enum_format(this, index, filter, result, builder);
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if((res = port_get_format(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (!port->have_format)
return -EIO;
if (*index > 0)
@ -499,7 +497,7 @@ static int impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
@ -516,18 +514,18 @@ static int impl_node_port_enum_params(struct spa_node *node,
return spa_v4l2_enum_controls(this, index, filter, result, builder);
}
#endif
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Clock,
":", SPA_PARAM_IO_id, "I", SPA_IO_Clock,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_clock));
break;
default:
@ -635,7 +633,7 @@ static int impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(node, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -734,10 +732,10 @@ static int impl_node_port_set_io(struct spa_node *node,
port = GET_PORT(this, direction, port_id);
if (id == SPA_ID_IO_Buffers) {
if (id == SPA_IO_Buffers) {
port->io = data;
}
else if (id == SPA_ID_IO_Clock) {
else if (id == SPA_IO_Clock) {
port->clock = data;
}
else if ((control = find_control(port, id))) {

View file

@ -675,7 +675,7 @@ spa_v4l2_enum_format(struct impl *this,
}
}
spa_pod_builder_push_object(builder, SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format);
spa_pod_builder_push_object(builder, SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format);
spa_pod_builder_add(builder,
"I", info->media_type,
"I", info->media_subtype, 0);
@ -1052,7 +1052,7 @@ spa_v4l2_enum_controls(struct impl *this,
switch (queryctrl.type) {
case V4L2_CTRL_TYPE_INTEGER:
param = spa_pod_builder_object(&b,
SPA_ID_PARAM_PropInfo, SPA_ID_OBJECT_PropInfo,
SPA_PARAM_PropInfo, SPA_ID_OBJECT_PropInfo,
":", SPA_PROP_INFO_id, "I", prop_id,
":", SPA_PROP_INFO_type, "isu", queryctrl.default_value,
SPA_POD_PROP_STEP(queryctrl.minimum,
@ -1062,7 +1062,7 @@ spa_v4l2_enum_controls(struct impl *this,
break;
case V4L2_CTRL_TYPE_BOOLEAN:
param = spa_pod_builder_object(&b,
SPA_ID_PARAM_PropInfo, SPA_ID_OBJECT_PropInfo,
SPA_PARAM_PropInfo, SPA_ID_OBJECT_PropInfo,
":", SPA_PROP_INFO_id, "I", prop_id,
":", SPA_PROP_INFO_type, "b-u", queryctrl.default_value,
":", SPA_PROP_INFO_name, "s", queryctrl.name);
@ -1071,7 +1071,7 @@ spa_v4l2_enum_controls(struct impl *this,
{
struct v4l2_querymenu querymenu;
spa_pod_builder_push_object(&b, SPA_ID_PARAM_PropInfo, SPA_ID_OBJECT_PropInfo);
spa_pod_builder_push_object(&b, SPA_PARAM_PropInfo, SPA_ID_OBJECT_PropInfo);
spa_pod_builder_add(&b,
":", SPA_PROP_INFO_id, "I", prop_id,
":", SPA_PROP_INFO_type, "i-u", queryctrl.default_value,

View file

@ -31,8 +31,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/video/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#define NAME "videotestsrc"
@ -126,10 +125,10 @@ static int impl_node_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_PropInfo,
SPA_ID_PARAM_Props };
uint32_t list[] = { SPA_PARAM_PropInfo,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -138,7 +137,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_PropInfo:
case SPA_PARAM_PropInfo:
{
struct props *p = &this->props;
@ -165,7 +164,7 @@ static int impl_node_enum_params(struct spa_node *node,
}
break;
}
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -203,7 +202,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
this = SPA_CONTAINER_OF(node, struct impl, node);
switch (id) {
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -464,7 +463,7 @@ static int port_enum_formats(struct spa_node *node,
switch (*index) {
case 0:
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_video,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_VIDEO_format, "Ieu", SPA_VIDEO_FORMAT_RGB,
@ -498,7 +497,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_video,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_VIDEO_format, "I", this->current_format.info.raw.format,
@ -534,12 +533,12 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -548,17 +547,17 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
{
struct spa_video_info_raw *raw_info = &this->current_format.info.raw;
@ -577,7 +576,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
}
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
if (!this->have_format)
return -EIO;
@ -670,7 +669,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(node, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -759,7 +758,7 @@ impl_node_port_set_io(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
this->io = data;
else
return -ENOENT;

View file

@ -26,9 +26,7 @@
#include <spa/node/node.h>
#include <spa/node/io.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/buffers.h>
#include <spa/param/meta.h>
#include <spa/param/io.h>
#include <spa/param/param.h>
#include <spa/pod/filter.h>
#define NAME "volume"
@ -121,10 +119,10 @@ static int impl_node_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_PropInfo,
SPA_ID_PARAM_Props };
uint32_t list[] = { SPA_PARAM_PropInfo,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -133,7 +131,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_PropInfo:
case SPA_PARAM_PropInfo:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
@ -154,7 +152,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
}
break;
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
@ -188,7 +186,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
this = SPA_CONTAINER_OF(node, struct impl, node);
switch (id) {
case SPA_ID_PARAM_Props:
case SPA_PARAM_Props:
{
struct props *p = &this->props;
@ -329,7 +327,7 @@ static int port_enum_formats(struct spa_node *node,
switch (*index) {
case 0:
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_S16,
@ -364,7 +362,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_ID_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
@ -403,13 +401,13 @@ impl_node_port_enum_params(struct spa_node *node,
spa_pod_builder_init(&b, buffer, sizeof(buffer));
switch (id) {
case SPA_ID_PARAM_List:
case SPA_PARAM_List:
{
uint32_t list[] = { SPA_ID_PARAM_EnumFormat,
SPA_ID_PARAM_Format,
SPA_ID_PARAM_Buffers,
SPA_ID_PARAM_Meta,
SPA_ID_PARAM_IO };
uint32_t list[] = { SPA_PARAM_EnumFormat,
SPA_PARAM_Format,
SPA_PARAM_Buffers,
SPA_PARAM_Meta,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
@ -418,15 +416,15 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
break;
}
case SPA_ID_PARAM_EnumFormat:
case SPA_PARAM_EnumFormat:
if ((res = port_enum_formats(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Format:
case SPA_PARAM_Format:
if ((res = port_get_format(node, direction, port_id, index, filter, &param, &b)) <= 0)
return res;
break;
case SPA_ID_PARAM_Buffers:
case SPA_PARAM_Buffers:
if (!port->have_format)
return -EIO;
if (*index > 0)
@ -442,7 +440,7 @@ impl_node_port_enum_params(struct spa_node *node,
":", SPA_PARAM_BUFFERS_stride, "i", 0,
":", SPA_PARAM_BUFFERS_align, "i", 16);
break;
case SPA_ID_PARAM_Meta:
case SPA_PARAM_Meta:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
@ -454,18 +452,18 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
}
break;
case SPA_ID_PARAM_IO:
case SPA_PARAM_IO:
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_Buffers,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
":", SPA_PARAM_IO_id, "I", SPA_ID_IO_ControlRange,
":", SPA_PARAM_IO_id, "I", SPA_IO_ControlRange,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_control_range));
break;
default:
@ -539,7 +537,7 @@ impl_node_port_set_param(struct spa_node *node,
spa_return_val_if_fail(CHECK_PORT(node, direction, port_id), -EINVAL);
if (id == SPA_ID_PARAM_Format) {
if (id == SPA_PARAM_Format) {
return port_set_format(node, direction, port_id, flags, param);
}
else
@ -627,9 +625,9 @@ impl_node_port_set_io(struct spa_node *node,
port = GET_PORT(this, direction, port_id);
if (id == SPA_ID_IO_Buffers)
if (id == SPA_IO_Buffers)
port->io = data;
else if (id == SPA_ID_IO_ControlRange)
else if (id == SPA_IO_ControlRange)
port->range = data;
else
return -ENOENT;