mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
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:
parent
281b65934e
commit
90c1a95eef
117 changed files with 1198 additions and 1272 deletions
|
|
@ -365,7 +365,7 @@ static int impl_node_enum_params(struct spa_node *node,
|
|||
|
||||
param = this->params[(*index)++];
|
||||
|
||||
if (!spa_pod_is_object_id(param, id))
|
||||
if (!spa_pod_is_object_type(param, id))
|
||||
continue;
|
||||
|
||||
if (spa_pod_filter(builder, result, param, filter) == 0)
|
||||
|
|
@ -1155,10 +1155,10 @@ node_init(struct node *this,
|
|||
|
||||
for (i = 0; i < n_support; i++) {
|
||||
switch (support[i].type) {
|
||||
case SPA_ID_INTERFACE_Log:
|
||||
case SPA_TYPE_INTERFACE_Log:
|
||||
this->log = support[i].data;
|
||||
break;
|
||||
case SPA_ID_INTERFACE_DataLoop:
|
||||
case SPA_TYPE_INTERFACE_DataLoop:
|
||||
this->data_loop = support[i].data;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -813,7 +813,7 @@ node_init(struct node *this,
|
|||
uint32_t i;
|
||||
|
||||
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;
|
||||
|
|
@ -905,7 +905,7 @@ static void client_node_initialized(void *data)
|
|||
media_type == SPA_MEDIA_TYPE_audio &&
|
||||
media_subtype == SPA_MEDIA_SUBTYPE_raw) {
|
||||
if ((impl->adapter = pw_load_spa_interface("audioconvert/libspa-audioconvert",
|
||||
"audioconvert", SPA_ID_INTERFACE_Node, NULL, 0, NULL)) == NULL)
|
||||
"audioconvert", SPA_TYPE_INTERFACE_Node, NULL, 0, NULL)) == NULL)
|
||||
return;
|
||||
|
||||
impl->adapter_mix = impl->adapter;
|
||||
|
|
|
|||
|
|
@ -938,7 +938,7 @@ static const struct pw_protocol_native_demarshal pw_protocol_native_client_node_
|
|||
};
|
||||
|
||||
static const struct pw_protocol_marshal pw_protocol_native_client_node_marshal = {
|
||||
PW_ID_INTERFACE_ClientNode,
|
||||
PW_TYPE_INTERFACE_ClientNode,
|
||||
PW_VERSION_CLIENT_NODE,
|
||||
&pw_protocol_native_client_node_method_marshal,
|
||||
&pw_protocol_native_client_node_method_demarshal,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue