More type cleanups

SPA_ID_* -> SPA_TYPE_*. We use 'type' for all registered types.
ID refers to either a registered type or an enum.
Improve introspection of object ids. Make 0 an invalid enum and
use it to look up the object id type.
Move some type-info files together.
Swap type and id of the object, we first specify the type and then
the id because the meaning of the id depends on the object type.
This commit is contained in:
Wim Taymans 2018-08-27 15:03:11 +02:00
parent 281b65934e
commit 90c1a95eef
117 changed files with 1198 additions and 1272 deletions

View file

@ -161,13 +161,13 @@ fill_item(struct impl *this, snd_ctl_card_info_t *card_info,
name = "Unknown";
spa_pod_builder_add(builder,
"<", 0, SPA_ID_OBJECT_MonitorItem,
"<", SPA_TYPE_OBJECT_MonitorItem, 0,
":", 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_name, "s", name,
":", SPA_MONITOR_ITEM_class, "s", klass,
":", SPA_MONITOR_ITEM_factory, "p", SPA_ID_INTERFACE_HandleFactory, factory,
":", SPA_MONITOR_ITEM_factory, "p", SPA_TYPE_INTERFACE_HandleFactory, factory,
":", SPA_MONITOR_ITEM_info, "[", NULL);
spa_pod_builder_add(builder,
@ -380,18 +380,18 @@ static void impl_on_fd_events(struct spa_source *source)
if (SPA_FLAG_CHECK(device->flags, DEVICE_FLAG_PLAYBACK)) {
snprintf(id, 64, "%s,%d/P", card->name, device->id);
event = spa_pod_builder_object(&b, id, SPA_ID_EVENT_Monitor);
event = spa_pod_builder_object(&b, SPA_TYPE_EVENT_Monitor, id);
spa_pod_builder_object(&b,
0, SPA_ID_OBJECT_MonitorItem,
SPA_TYPE_OBJECT_MonitorItem, 0,
":", SPA_MONITOR_ITEM_id, "s", id,
":", SPA_MONITOR_ITEM_name, "s", id);
this->callbacks->event(this->callbacks_data, event);
}
if (SPA_FLAG_CHECK(device->flags, DEVICE_FLAG_RECORD)) {
snprintf(id, 64, "%s,%d/C", card->name, device->id);
event = spa_pod_builder_object(&b, id, SPA_ID_EVENT_Monitor);
event = spa_pod_builder_object(&b, SPA_TYPE_EVENT_Monitor, id);
spa_pod_builder_object(&b,
0, SPA_ID_OBJECT_MonitorItem,
SPA_TYPE_OBJECT_MonitorItem, 0,
":", SPA_MONITOR_ITEM_id, "s", id,
":", SPA_MONITOR_ITEM_name, "s", id);
this->callbacks->event(this->callbacks_data, event);
@ -408,7 +408,7 @@ static void impl_on_fd_events(struct spa_source *source)
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(buffer, sizeof(buffer));
struct spa_pod *item;
event = spa_pod_builder_object(&b, id, SPA_ID_EVENT_Monitor);
event = spa_pod_builder_object(&b, SPA_TYPE_EVENT_Monitor, id);
if (get_next_device(this, card, &item, &b) < 0)
break;
@ -535,7 +535,7 @@ static const struct spa_monitor impl_monitor = {
impl_monitor_enum_items,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -544,7 +544,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Monitor)
if (type == SPA_TYPE_INTERFACE_Monitor)
*interface = &this->monitor;
else
return -ENOENT;
@ -596,9 +596,9 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_MainLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_MainLoop)
this->main_loop = support[i].data;
}
if (this->main_loop == NULL) {
@ -612,7 +612,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Monitor,},
{SPA_TYPE_INTERFACE_Monitor,},
};
static int

View file

@ -69,7 +69,7 @@ static int impl_node_enum_params(struct spa_node *node,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -82,28 +82,28 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_device,
":", SPA_PROP_INFO_name, "s", "The ALSA device",
":", SPA_PROP_INFO_type, "S", p->device, sizeof(p->device));
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_deviceName,
":", SPA_PROP_INFO_name, "s", "The ALSA device name",
":", SPA_PROP_INFO_type, "S-r", p->device_name, sizeof(p->device_name));
break;
case 2:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_cardName,
":", SPA_PROP_INFO_name, "s", "The ALSA card name",
":", SPA_PROP_INFO_type, "S-r", p->card_name, sizeof(p->card_name));
break;
case 3:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_minLatency,
":", SPA_PROP_INFO_name, "s", "The minimum latency",
":", SPA_PROP_INFO_type, "ir", p->min_latency,
@ -111,7 +111,7 @@ static int impl_node_enum_params(struct spa_node *node,
break;
case 4:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_maxLatency,
":", SPA_PROP_INFO_name, "s", "The maximum latency",
":", SPA_PROP_INFO_type, "ir", p->max_latency,
@ -129,7 +129,7 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Props,
SPA_TYPE_OBJECT_Props, id,
":", SPA_PROP_device, "S", p->device, sizeof(p->device),
":", SPA_PROP_deviceName, "S-r", p->device_name, sizeof(p->device_name),
":", SPA_PROP_cardName, "S-r", p->card_name, sizeof(p->card_name),
@ -327,7 +327,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_IO, };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -343,7 +343,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, id,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
@ -359,7 +359,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "ir", 1,
SPA_POD_PROP_MIN_MAX(1, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", 1,
@ -378,7 +378,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -391,19 +391,19 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", 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_TYPE_OBJECT_ParamIO, id,
":", 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_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_Clock,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_clock));
break;
@ -680,7 +680,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct state *this;
@ -689,7 +689,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct state *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -724,11 +724,11 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct state *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_DataLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_DataLoop)
this->data_loop = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_MainLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_MainLoop)
this->main_loop = support[i].data;
}
if (this->data_loop == NULL) {
@ -761,7 +761,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -73,7 +73,7 @@ static int impl_node_enum_params(struct spa_node *node,
SPA_PARAM_Props, };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -83,28 +83,28 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_device,
":", SPA_PROP_INFO_name, "s", "The ALSA device",
":", SPA_PROP_INFO_type, "S", p->device, sizeof(p->device));
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_deviceName,
":", SPA_PROP_INFO_name, "s", "The ALSA device name",
":", SPA_PROP_INFO_type, "S-r", p->device_name, sizeof(p->device_name));
break;
case 2:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_cardName,
":", SPA_PROP_INFO_name, "s", "The ALSA card name",
":", SPA_PROP_INFO_type, "S-r", p->card_name, sizeof(p->card_name));
break;
case 3:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_minLatency,
":", SPA_PROP_INFO_name, "s", "The minimum latency",
":", SPA_PROP_INFO_type, "ir", p->min_latency,
@ -112,7 +112,7 @@ static int impl_node_enum_params(struct spa_node *node,
break;
case 4:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_maxLatency,
":", SPA_PROP_INFO_name, "s", "The maximum latency",
":", SPA_PROP_INFO_type, "ir", p->max_latency,
@ -127,7 +127,7 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Props,
SPA_TYPE_OBJECT_Props, id,
":", SPA_PROP_device, "S", p->device, sizeof(p->device),
":", SPA_PROP_deviceName, "S-r", p->device_name, sizeof(p->device_name),
":", SPA_PROP_cardName, "S-r", p->card_name, sizeof(p->card_name),
@ -319,7 +319,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
@ -364,7 +364,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_Meta };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -385,7 +385,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "ir", 2,
SPA_POD_PROP_MIN_MAX(1, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", 1,
@ -404,7 +404,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -417,13 +417,13 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", 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_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_Clock,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_clock));
break;
@ -707,7 +707,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct state *this;
@ -716,7 +716,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct state *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -755,11 +755,11 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct state *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_DataLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_DataLoop)
this->data_loop = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_MainLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_MainLoop)
this->main_loop = support[i].data;
}
if (this->data_loop == NULL) {
@ -792,7 +792,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

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_PARAM_EnumFormat, SPA_ID_OBJECT_Format);
spa_pod_builder_push_object(&b, SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat);
spa_pod_builder_add(&b,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw, 0);

View file

@ -568,7 +568,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(builder,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_volume,
":", SPA_PROP_INFO_type, "fru", 1.0,
SPA_POD_PROP_MIN_MAX(0.0, 10.0));
@ -752,7 +752,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -761,7 +761,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -820,7 +820,7 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
}
this->node = impl_node;
@ -849,13 +849,13 @@ impl_init(const struct spa_handle_factory *factory,
info, support, n_support);
size = spa_handle_factory_get_size(&spa_resample_factory, info);
spa_handle_get_interface(this->hnd_fmt[SPA_DIRECTION_INPUT], SPA_ID_INTERFACE_Node, &iface);
spa_handle_get_interface(this->hnd_fmt[SPA_DIRECTION_INPUT], SPA_TYPE_INTERFACE_Node, &iface);
this->fmt[SPA_DIRECTION_INPUT] = iface;
spa_handle_get_interface(this->hnd_fmt[SPA_DIRECTION_OUTPUT], SPA_ID_INTERFACE_Node, &iface);
spa_handle_get_interface(this->hnd_fmt[SPA_DIRECTION_OUTPUT], SPA_TYPE_INTERFACE_Node, &iface);
this->fmt[SPA_DIRECTION_OUTPUT] = iface;
spa_handle_get_interface(this->hnd_channelmix, SPA_ID_INTERFACE_Node, &iface);
spa_handle_get_interface(this->hnd_channelmix, SPA_TYPE_INTERFACE_Node, &iface);
this->channelmix = iface;
spa_handle_get_interface(this->hnd_resample, SPA_ID_INTERFACE_Node, &iface);
spa_handle_get_interface(this->hnd_resample, SPA_TYPE_INTERFACE_Node, &iface);
this->resample = iface;
props_reset(&this->props);
@ -864,7 +864,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{ SPA_ID_INTERFACE_Node, },
{ SPA_TYPE_INTERFACE_Node, },
};
static int

View file

@ -312,7 +312,7 @@ static int port_enum_formats(struct spa_node *node,
case 0:
if (other->have_format) {
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
@ -322,7 +322,7 @@ static int port_enum_formats(struct spa_node *node,
SPA_POD_PROP_MIN_MAX(1, INT32_MAX));
} else {
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
@ -354,7 +354,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", port->format.info.raw.format,
@ -404,7 +404,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -438,7 +438,7 @@ impl_node_port_enum_params(struct spa_node *node,
}
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "iru", buffers,
SPA_POD_PROP_MIN_MAX(1, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", port->blocks,
@ -455,7 +455,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -468,7 +468,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
@ -818,7 +818,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -827,7 +827,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -867,7 +867,7 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
}
@ -889,7 +889,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -421,7 +421,7 @@ static int port_enum_formats(struct spa_node *node,
case 0:
if (other->info.raw.channels > 0) {
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", other->info.raw.format,
@ -435,7 +435,7 @@ static int port_enum_formats(struct spa_node *node,
":", SPA_FORMAT_AUDIO_channels, "i", other->info.raw.channels);
} else {
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_S16,
@ -480,7 +480,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", port->format.info.raw.format,
@ -531,7 +531,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -568,7 +568,7 @@ impl_node_port_enum_params(struct spa_node *node,
}
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "iru", buffers,
SPA_POD_PROP_MIN_MAX(2, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", port->blocks,
@ -585,7 +585,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -598,7 +598,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
@ -1126,7 +1126,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -1135,7 +1135,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -1174,7 +1174,7 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
}
this->node = impl_node;
@ -1188,7 +1188,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -319,7 +319,7 @@ static int port_enum_formats(struct spa_node *node,
if (direction == SPA_DIRECTION_OUTPUT) {
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_F32,
@ -344,7 +344,7 @@ static int port_enum_formats(struct spa_node *node,
}
else {
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
@ -375,7 +375,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", port->format.info.raw.format,
@ -426,7 +426,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_IO, };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -446,7 +446,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "iru", 1,
SPA_POD_PROP_MIN_MAX(1, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", port->blocks,
@ -462,7 +462,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "i", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -474,7 +474,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
@ -935,7 +935,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -944,7 +944,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -987,7 +987,7 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
}
@ -1010,7 +1010,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -282,7 +282,7 @@ static int port_enum_formats(struct spa_node *node,
case 0:
if (other->have_format) {
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
@ -292,7 +292,7 @@ static int port_enum_formats(struct spa_node *node,
":", SPA_FORMAT_AUDIO_channels, "i", other->format.info.raw.channels);
} else {
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
@ -324,7 +324,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", port->format.info.raw.format,
@ -374,7 +374,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -407,7 +407,7 @@ impl_node_port_enum_params(struct spa_node *node,
}
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "iru", buffers,
SPA_POD_PROP_MIN_MAX(1, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", port->blocks,
@ -424,7 +424,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -436,7 +436,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
@ -799,7 +799,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -808,7 +808,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -856,7 +856,7 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
}
@ -878,7 +878,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -319,7 +319,7 @@ static int port_enum_formats(struct spa_node *node,
if (direction == SPA_DIRECTION_INPUT) {
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_F32,
@ -344,7 +344,7 @@ static int port_enum_formats(struct spa_node *node,
}
else {
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
@ -375,7 +375,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", port->format.info.raw.format,
@ -426,7 +426,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -447,7 +447,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "iru", 1,
SPA_POD_PROP_MIN_MAX(1, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", port->blocks,
@ -464,7 +464,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -476,7 +476,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_Buffers,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_buffers));
break;
@ -944,7 +944,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -953,7 +953,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -996,7 +996,7 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
}
@ -1018,7 +1018,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -327,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_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->format.info.raw.format,
@ -335,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_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_S16,
@ -368,7 +368,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->format.info.raw.format,
@ -416,7 +416,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_IO, };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -437,7 +437,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "iru", 1,
SPA_POD_PROP_MIN_MAX(1, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", 1,
@ -453,7 +453,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -465,13 +465,13 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", 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_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_ControlRange,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_control_range));
break;
@ -971,7 +971,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -980,7 +980,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -1020,7 +1020,7 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
}
@ -1039,7 +1039,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -148,7 +148,7 @@ static int impl_node_enum_params(struct spa_node *node,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -161,14 +161,14 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_live,
":", SPA_PROP_INFO_name, "s", "Configure live mode of the source",
":", SPA_PROP_INFO_type, "b", p->live);
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_waveType,
":", SPA_PROP_INFO_name, "s", "Select the waveform",
":", SPA_PROP_INFO_type, "i", p->wave,
@ -178,7 +178,7 @@ static int impl_node_enum_params(struct spa_node *node,
break;
case 2:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_frequency,
":", SPA_PROP_INFO_name, "s", "Select the frequency",
":", SPA_PROP_INFO_type, "dr", p->freq,
@ -186,7 +186,7 @@ static int impl_node_enum_params(struct spa_node *node,
break;
case 3:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_volume,
":", SPA_PROP_INFO_name, "s", "Select the volume",
":", SPA_PROP_INFO_type, "dr", p->volume,
@ -204,7 +204,7 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Props,
SPA_TYPE_OBJECT_Props, id,
":", SPA_PROP_live, "b", p->live,
":", SPA_PROP_waveType, "i", p->wave,
":", SPA_PROP_frequency, "d", p->freq,
@ -524,7 +524,7 @@ port_enum_formats(struct impl *this,
switch (*index) {
case 0:
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_S16,
@ -557,7 +557,7 @@ port_get_format(struct impl *this,
return 0;
*param = spa_pod_builder_object(builder,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
@ -602,7 +602,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_IO, };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -624,7 +624,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "iru", 1,
SPA_POD_PROP_MIN_MAX(1, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", 1,
@ -640,7 +640,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -652,13 +652,13 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", 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_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_ControlRange,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_control_range));
break;
@ -1003,7 +1003,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -1012,7 +1012,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -1061,9 +1061,9 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_DataLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_DataLoop)
this->data_loop = support[i].data;
}
@ -1099,7 +1099,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -166,7 +166,7 @@ static int impl_node_enum_params(struct spa_node *node,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -179,7 +179,7 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_minLatency,
":", SPA_PROP_INFO_name, "s", "The minimum latency",
":", SPA_PROP_INFO_type, "ir", p->min_latency,
@ -187,7 +187,7 @@ static int impl_node_enum_params(struct spa_node *node,
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_maxLatency,
":", SPA_PROP_INFO_name, "s", "The maximum latency",
":", SPA_PROP_INFO_type, "ir", p->max_latency,
@ -205,7 +205,7 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Props,
SPA_TYPE_OBJECT_Props, id,
":", SPA_PROP_minLatency, "i", p->min_latency,
":", SPA_PROP_maxLatency, "i", p->max_latency);
break;
@ -946,7 +946,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_Meta };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -966,7 +966,7 @@ impl_node_port_enum_params(struct spa_node *node,
return -EIO;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, id,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_S16,
@ -985,7 +985,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, id,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
@ -1001,7 +1001,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "ir", 2,
SPA_POD_PROP_MIN_MAX(2, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", 1,
@ -1020,7 +1020,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -1288,7 +1288,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -1297,7 +1297,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -1336,11 +1336,11 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_DataLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_DataLoop)
this->data_loop = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_MainLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_MainLoop)
this->main_loop = support[i].data;
}
if (this->data_loop == NULL) {
@ -1373,7 +1373,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -70,13 +70,13 @@ static void fill_item(struct spa_bt_monitor *this, struct spa_bt_transport *tran
char trans[16];
spa_pod_builder_add(builder,
"<", 0, SPA_ID_OBJECT_MonitorItem,
"<", SPA_TYPE_OBJECT_MonitorItem, 0,
":", 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_name, "s", transport->path,
":", SPA_MONITOR_ITEM_class, "s", "Adapter/Bluetooth",
":", SPA_MONITOR_ITEM_factory, "p", SPA_ID_INTERFACE_HandleFactory, &spa_a2dp_sink_factory,
":", SPA_MONITOR_ITEM_factory, "p", SPA_TYPE_INTERFACE_HandleFactory, &spa_a2dp_sink_factory,
":", SPA_MONITOR_ITEM_info, "[",
NULL);
@ -640,7 +640,7 @@ static struct spa_bt_node *node_create(struct spa_bt_monitor *monitor, struct sp
struct spa_pod *item;
spa_pod_builder_init(&b, buffer, sizeof(buffer));
event = spa_pod_builder_object(&b, SPA_MONITOR_EVENT_Added, SPA_ID_EVENT_Monitor);
event = spa_pod_builder_object(&b, SPA_TYPE_EVENT_Monitor, SPA_MONITOR_EVENT_Added);
fill_item(monitor, transport, &item, &b);
monitor->callbacks->event(monitor->callbacks_data, event);
@ -656,7 +656,7 @@ static struct spa_bt_node *node_destroy(struct spa_bt_monitor *monitor, struct s
struct spa_pod *item;
spa_pod_builder_init(&b, buffer, sizeof(buffer));
event = spa_pod_builder_object(&b, SPA_MONITOR_EVENT_Removed, SPA_ID_EVENT_Monitor);
event = spa_pod_builder_object(&b, SPA_TYPE_EVENT_Monitor, SPA_MONITOR_EVENT_Removed);
fill_item(monitor, transport, &item, &b);
monitor->callbacks->event(monitor->callbacks_data, event);
@ -1178,7 +1178,7 @@ static const struct spa_monitor impl_monitor = {
impl_monitor_enum_items,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct spa_bt_monitor *this;
@ -1187,7 +1187,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct spa_bt_monitor *) handle;
if (interface_id == SPA_ID_INTERFACE_Monitor)
if (type == SPA_TYPE_INTERFACE_Monitor)
*interface = &this->monitor;
else
return -ENOENT;
@ -1226,9 +1226,9 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct spa_bt_monitor *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_DBus)
else if (support[i].type == SPA_TYPE_INTERFACE_DBus)
this->dbus = support[i].data;
}
if (this->dbus == NULL) {
@ -1253,7 +1253,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Monitor,},
{SPA_TYPE_INTERFACE_Monitor,},
};
static int

View file

@ -275,7 +275,7 @@ spa_ffmpeg_dec_node_port_enum_params(struct spa_node *node,
SPA_PARAM_Format };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -485,7 +485,7 @@ static const struct spa_node ffmpeg_dec_node = {
};
static int
spa_ffmpeg_dec_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
spa_ffmpeg_dec_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -494,7 +494,7 @@ spa_ffmpeg_dec_get_interface(struct spa_handle *handle, uint32_t interface_id, v
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -516,7 +516,7 @@ spa_ffmpeg_dec_init(struct spa_handle *handle,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
}

View file

@ -264,7 +264,7 @@ spa_ffmpeg_enc_node_port_enum_params(struct spa_node *node,
SPA_PARAM_Format };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -462,7 +462,7 @@ static const struct spa_node ffmpeg_enc_node = {
};
static int
spa_ffmpeg_enc_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
spa_ffmpeg_enc_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -471,7 +471,7 @@ spa_ffmpeg_enc_get_interface(struct spa_handle *handle, uint32_t interface_id, v
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -492,7 +492,7 @@ spa_ffmpeg_enc_init(struct spa_handle *handle,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
}

View file

@ -58,7 +58,7 @@ ffmpeg_enc_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info ffmpeg_interfaces[] = {
{SPA_ID_INTERFACE_Node, },
{SPA_TYPE_INTERFACE_Node, },
};
static int

View file

@ -318,7 +318,7 @@ static const struct spa_dbus impl_dbus = {
impl_get_connection,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -327,7 +327,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_DBus)
if (type == SPA_TYPE_INTERFACE_DBus)
*interface = &this->dbus;
else
return -ENOENT;
@ -370,9 +370,9 @@ impl_init(const struct spa_handle_factory *factory,
this->dbus = impl_dbus;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_LoopUtils)
else if (support[i].type == SPA_TYPE_INTERFACE_LoopUtils)
this->utils = support[i].data;
}
if (this->utils == NULL) {
@ -386,7 +386,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_DBus,},
{SPA_TYPE_INTERFACE_DBus,},
};
static int

View file

@ -149,7 +149,7 @@ static const struct spa_log impl_log = {
impl_log_logv,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -158,7 +158,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Log)
if (type == SPA_TYPE_INTERFACE_Log)
*interface = &this->log;
else
return -ENOENT;
@ -212,7 +212,7 @@ impl_init(const struct spa_handle_factory *factory,
this->log = impl_log;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_MainLoop)
if (support[i].type == SPA_TYPE_INTERFACE_MainLoop)
loop = support[i].data;
}
@ -237,7 +237,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Log,},
{SPA_TYPE_INTERFACE_Log,},
};
static int

View file

@ -652,7 +652,7 @@ static const struct spa_loop_utils impl_loop_utils = {
loop_destroy_source,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *impl;
@ -661,14 +661,14 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
impl = (struct impl *) handle;
switch (interface_id) {
case SPA_ID_INTERFACE_Loop:
switch (type) {
case SPA_TYPE_INTERFACE_Loop:
*interface = &impl->loop;
break;
case SPA_ID_INTERFACE_LoopControl:
case SPA_TYPE_INTERFACE_LoopControl:
*interface = &impl->control;
break;
case SPA_ID_INTERFACE_LoopUtils:
case SPA_TYPE_INTERFACE_LoopUtils:
*interface = &impl->utils;
break;
default:
@ -726,7 +726,7 @@ impl_init(const struct spa_handle_factory *factory,
impl->utils = impl_loop_utils;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
impl->log = support[i].data;
}
@ -749,9 +749,9 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Loop,},
{SPA_ID_INTERFACE_LoopControl,},
{SPA_ID_INTERFACE_LoopUtils,},
{SPA_TYPE_INTERFACE_Loop,},
{SPA_TYPE_INTERFACE_LoopControl,},
{SPA_TYPE_INTERFACE_LoopUtils,},
};
static int

View file

@ -116,7 +116,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamList,
SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", SPA_PARAM_Props);
break;
case SPA_PARAM_Props:
@ -124,7 +124,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Props,
SPA_TYPE_OBJECT_Props, id,
":", SPA_PROP_live, "b", this->props.live);
break;
default:
@ -460,7 +460,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_Meta };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -479,7 +479,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "ir", 2,
SPA_POD_PROP_MIN_MAX(1, 32),
":", SPA_PARAM_BUFFERS_blocks, "i", 1,
@ -491,7 +491,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -718,7 +718,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -727,7 +727,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -776,9 +776,9 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_DataLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_DataLoop)
this->data_loop = support[i].data;
}
@ -810,7 +810,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -121,7 +121,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamList,
SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", SPA_PARAM_Props);
break;
@ -133,7 +133,7 @@ static int impl_node_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Props,
SPA_TYPE_OBJECT_Props, id,
":", SPA_PROP_live, "b", p->live,
":", SPA_PROP_patternType, "Ie", p->pattern,
SPA_POD_PROP_ENUM(1, p->pattern));
@ -476,7 +476,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_Meta };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -495,7 +495,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "ir", 32,
SPA_POD_PROP_MIN_MAX(2, 32),
":", SPA_PARAM_BUFFERS_blocks, "i", 1,
@ -507,7 +507,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -754,7 +754,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -763,7 +763,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -812,9 +812,9 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_DataLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_DataLoop)
this->data_loop = support[i].data;
}
@ -846,7 +846,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -98,13 +98,13 @@ static void fill_item(struct impl *this, struct item *item, struct udev_device *
name = "Unknown";
spa_pod_builder_add(builder,
"<", 0, SPA_ID_OBJECT_MonitorItem,
"<", SPA_TYPE_OBJECT_MonitorItem, 0,
":", 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_name, "s", name,
":", SPA_MONITOR_ITEM_class, "s", "Video/Source",
":", SPA_MONITOR_ITEM_factory, "p", SPA_ID_INTERFACE_HandleFactory, &spa_v4l2_source_factory,
":", SPA_MONITOR_ITEM_factory, "p", SPA_TYPE_INTERFACE_HandleFactory, &spa_v4l2_source_factory,
":", SPA_MONITOR_ITEM_info, "[",
NULL);
@ -165,7 +165,7 @@ static void impl_on_fd_events(struct spa_source *source)
struct udev_device *dev;
struct spa_event *event;
const char *action;
uint32_t type;
uint32_t id;
struct spa_pod_builder b = { NULL, };
uint8_t buffer[4096];
struct spa_pod *item;
@ -178,16 +178,16 @@ static void impl_on_fd_events(struct spa_source *source)
action = "change";
if (strcmp(action, "add") == 0) {
type = SPA_MONITOR_EVENT_Added;
id = SPA_MONITOR_EVENT_Added;
} else if (strcmp(action, "change") == 0) {
type = SPA_MONITOR_EVENT_Changed;
id = SPA_MONITOR_EVENT_Changed;
} else if (strcmp(action, "remove") == 0) {
type = SPA_MONITOR_EVENT_Removed;
id = SPA_MONITOR_EVENT_Removed;
} else
return;
spa_pod_builder_init(&b, buffer, sizeof(buffer));
event = spa_pod_builder_object(&b, type, SPA_ID_EVENT_Monitor);
event = spa_pod_builder_object(&b, SPA_TYPE_EVENT_Monitor, id);
fill_item(this, &this->uitem, dev, &item, &b);
this->callbacks->event(this->callbacks_data, event);
@ -291,7 +291,7 @@ static const struct spa_monitor impl_monitor = {
impl_monitor_enum_items,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -300,7 +300,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Monitor)
if (type == SPA_TYPE_INTERFACE_Monitor)
*interface = &this->monitor;
else
return -ENOENT;
@ -350,9 +350,9 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_MainLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_MainLoop)
this->main_loop = support[i].data;
}
if (this->main_loop == NULL) {
@ -366,7 +366,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Monitor,},
{SPA_TYPE_INTERFACE_Monitor,},
};
static int

View file

@ -162,7 +162,7 @@ static int impl_node_enum_params(struct spa_node *node,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -175,21 +175,21 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_device,
":", SPA_PROP_INFO_name, "s", "The V4L2 device",
":", SPA_PROP_INFO_type, "S", p->device, sizeof(p->device));
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_deviceName,
":", SPA_PROP_INFO_name, "s", "The V4L2 device name",
":", SPA_PROP_INFO_type, "S-r", p->device_name, sizeof(p->device_name));
break;
case 2:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_deviceFd,
":", SPA_PROP_INFO_name, "s", "The V4L2 fd",
":", SPA_PROP_INFO_type, "i-r", p->device_fd);
@ -206,7 +206,7 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Props,
SPA_TYPE_OBJECT_Props, id,
":", SPA_PROP_device, "S", p->device, sizeof(p->device),
":", SPA_PROP_deviceName, "S-r", p->device_name, sizeof(p->device_name),
":", SPA_PROP_deviceFd, "i-r", p->device_fd);
@ -392,7 +392,7 @@ static int port_get_format(struct spa_node *node,
if (*index > 0)
return 0;
spa_pod_builder_push_object(builder, SPA_PARAM_Format, SPA_ID_OBJECT_Format);
spa_pod_builder_push_object(builder, SPA_TYPE_OBJECT_Format, SPA_PARAM_Format);
spa_pod_builder_add(builder,
"I", port->current_format.media_type,
@ -465,7 +465,7 @@ static int impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -488,7 +488,7 @@ static int impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "iru", MAX_BUFFERS,
SPA_POD_PROP_MIN_MAX(2, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", 1,
@ -501,7 +501,7 @@ static int impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -518,13 +518,13 @@ static int impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", 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_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_Clock,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_clock));
break;
@ -872,7 +872,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -881,7 +881,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -923,11 +923,11 @@ impl_init(const struct spa_handle_factory *factory,
port = GET_OUT_PORT(this, 0);
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_MainLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_MainLoop)
port->main_loop = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_DataLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_DataLoop)
port->data_loop = support[i].data;
}
if (port->main_loop == NULL) {
@ -963,7 +963,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int impl_enum_interface_info(const struct spa_handle_factory *factory,

View file

@ -409,7 +409,7 @@ enum_filter_format(uint32_t media_type, int32_t media_subtype,
if (!(p = spa_pod_find_prop(filter, SPA_FORMAT_VIDEO_format)))
return SPA_VIDEO_FORMAT_UNKNOWN;
if (p->body.value.type != SPA_ID_Enum)
if (p->body.value.type != SPA_TYPE_Enum)
return SPA_VIDEO_FORMAT_UNKNOWN;
values = SPA_POD_BODY_CONST(&p->body.value);
@ -596,7 +596,7 @@ spa_v4l2_enum_format(struct impl *this,
if (!(p = spa_pod_find_prop(filter, SPA_FORMAT_VIDEO_size)))
goto do_frmsize;
if (p->body.value.type != SPA_ID_Rectangle) {
if (p->body.value.type != SPA_TYPE_Rectangle) {
goto enum_end;
}
@ -675,7 +675,7 @@ spa_v4l2_enum_format(struct impl *this,
}
}
spa_pod_builder_push_object(builder, SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format);
spa_pod_builder_push_object(builder, SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat);
spa_pod_builder_add(builder,
"I", info->media_type,
"I", info->media_subtype, 0);
@ -717,7 +717,7 @@ spa_v4l2_enum_format(struct impl *this,
if (!(p = spa_pod_find_prop(filter, SPA_FORMAT_VIDEO_framerate)))
goto have_framerate;
if (p->body.value.type != SPA_ID_Fraction)
if (p->body.value.type != SPA_TYPE_Fraction)
goto enum_end;
range = p->body.flags & SPA_POD_PROP_RANGE_MASK;
@ -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_PARAM_PropInfo, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, SPA_PARAM_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_PARAM_PropInfo, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, SPA_PARAM_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_PARAM_PropInfo, SPA_ID_OBJECT_PropInfo);
spa_pod_builder_push_object(&b, SPA_TYPE_OBJECT_PropInfo, SPA_PARAM_PropInfo);
spa_pod_builder_add(&b,
":", SPA_PROP_INFO_id, "I", prop_id,
":", SPA_PROP_INFO_type, "i-u", queryctrl.default_value,

View file

@ -131,7 +131,7 @@ static int impl_node_enum_params(struct spa_node *node,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -144,14 +144,14 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_live,
":", SPA_PROP_INFO_name, "s", "Configure live mode of the source",
":", SPA_PROP_INFO_type, "b", p->live);
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_patternType,
":", SPA_PROP_INFO_name, "s", "The pattern",
":", SPA_PROP_INFO_type, "i", p->pattern,
@ -171,7 +171,7 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Props,
SPA_TYPE_OBJECT_Props, id,
":", SPA_PROP_live, "b", p->live,
":", SPA_PROP_patternType, "i", p->pattern);
break;
@ -463,7 +463,7 @@ static int port_enum_formats(struct spa_node *node,
switch (*index) {
case 0:
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_video,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_VIDEO_format, "Ieu", SPA_VIDEO_FORMAT_RGB,
@ -497,7 +497,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_Format,
"I", SPA_MEDIA_TYPE_video,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_VIDEO_format, "I", this->current_format.info.raw.format,
@ -541,7 +541,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_Meta };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -567,7 +567,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "ir", 2,
SPA_POD_PROP_MIN_MAX(1, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", 1,
@ -583,7 +583,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -861,7 +861,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -870,7 +870,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -919,9 +919,9 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
else if (support[i].type == SPA_ID_INTERFACE_DataLoop)
else if (support[i].type == SPA_TYPE_INTERFACE_DataLoop)
this->data_loop = support[i].data;
}
@ -953,7 +953,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int

View file

@ -125,7 +125,7 @@ static int impl_node_enum_params(struct spa_node *node,
SPA_PARAM_Props };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -135,7 +135,7 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_volume,
":", SPA_PROP_INFO_name, "s", "The volume",
":", SPA_PROP_INFO_type, "dr", p->volume,
@ -143,7 +143,7 @@ static int impl_node_enum_params(struct spa_node *node,
break;
case 1:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_PropInfo,
SPA_TYPE_OBJECT_PropInfo, id,
":", SPA_PROP_INFO_id, "I", SPA_PROP_mute,
":", SPA_PROP_INFO_name, "s", "Mute",
":", SPA_PROP_INFO_type, "b", p->mute);
@ -156,7 +156,7 @@ static int impl_node_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_Props,
SPA_TYPE_OBJECT_Props, id,
":", SPA_PROP_volume, "d", p->volume,
":", SPA_PROP_mute, "b", p->mute);
break;
@ -327,7 +327,7 @@ static int port_enum_formats(struct spa_node *node,
switch (*index) {
case 0:
*param = spa_pod_builder_object(builder,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "Ieu", SPA_AUDIO_FORMAT_S16,
@ -362,7 +362,7 @@ static int port_get_format(struct spa_node *node,
return 0;
*param = spa_pod_builder_object(builder,
SPA_PARAM_Format, SPA_ID_OBJECT_Format,
SPA_TYPE_OBJECT_Format, SPA_PARAM_Format,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
@ -410,7 +410,7 @@ impl_node_port_enum_params(struct spa_node *node,
SPA_PARAM_IO };
if (*index < SPA_N_ELEMENTS(list))
param = spa_pod_builder_object(&b, id, SPA_ID_OBJECT_ParamList,
param = spa_pod_builder_object(&b, SPA_TYPE_OBJECT_ParamList, id,
":", SPA_PARAM_LIST_id, "I", list[*index]);
else
return 0;
@ -431,7 +431,7 @@ impl_node_port_enum_params(struct spa_node *node,
return 0;
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamBuffers,
SPA_TYPE_OBJECT_ParamBuffers, id,
":", SPA_PARAM_BUFFERS_buffers, "iru", 2,
SPA_POD_PROP_MIN_MAX(1, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", 1,
@ -444,7 +444,7 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamMeta,
SPA_TYPE_OBJECT_ParamMeta, id,
":", SPA_PARAM_META_type, "I", SPA_META_Header,
":", SPA_PARAM_META_size, "i", sizeof(struct spa_meta_header));
break;
@ -456,13 +456,13 @@ impl_node_port_enum_params(struct spa_node *node,
switch (*index) {
case 0:
param = spa_pod_builder_object(&b,
id, SPA_ID_OBJECT_ParamIO,
SPA_TYPE_OBJECT_ParamIO, id,
":", 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_TYPE_OBJECT_ParamIO, id,
":", SPA_PARAM_IO_id, "I", SPA_IO_ControlRange,
":", SPA_PARAM_IO_size, "i", sizeof(struct spa_io_control_range));
break;
@ -819,7 +819,7 @@ static const struct spa_node impl_node = {
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)
static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **interface)
{
struct impl *this;
@ -828,7 +828,7 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id,
this = (struct impl *) handle;
if (interface_id == SPA_ID_INTERFACE_Node)
if (type == SPA_TYPE_INTERFACE_Node)
*interface = &this->node;
else
return -ENOENT;
@ -867,7 +867,7 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_ID_INTERFACE_Log)
if (support[i].type == SPA_TYPE_INTERFACE_Log)
this->log = support[i].data;
}
@ -886,7 +886,7 @@ impl_init(const struct spa_handle_factory *factory,
}
static const struct spa_interface_info impl_interfaces[] = {
{SPA_ID_INTERFACE_Node,},
{SPA_TYPE_INTERFACE_Node,},
};
static int