mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04: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
|
|
@ -122,7 +122,7 @@ inspect_port_params(struct data *data, struct spa_node *node,
|
|||
break;
|
||||
}
|
||||
|
||||
if (spa_pod_is_object_type(param, SPA_ID_OBJECT_Format))
|
||||
if (spa_pod_is_object_id(param, SPA_TYPE_OBJECT_Format))
|
||||
spa_debug_format(0, NULL, param);
|
||||
else
|
||||
spa_debug_pod(0, spa_debug_types, param);
|
||||
|
|
@ -219,7 +219,7 @@ static void inspect_factory(struct data *data, const struct spa_handle_factory *
|
|||
continue;
|
||||
}
|
||||
|
||||
if (info->type == SPA_ID_INTERFACE_Node)
|
||||
if (info->type == SPA_TYPE_INTERFACE_Node)
|
||||
inspect_node(data, interface);
|
||||
else
|
||||
printf("skipping unknown interface\n");
|
||||
|
|
@ -263,9 +263,9 @@ int main(int argc, char *argv[])
|
|||
if ((str = getenv("SPA_DEBUG")))
|
||||
data.log->level = atoi(str);
|
||||
|
||||
data.support[0] = SPA_SUPPORT_INIT(SPA_ID_INTERFACE_Log, data.log);
|
||||
data.support[1] = SPA_SUPPORT_INIT(SPA_ID_INTERFACE_MainLoop, &data.loop);
|
||||
data.support[2] = SPA_SUPPORT_INIT(SPA_ID_INTERFACE_DataLoop, &data.loop);
|
||||
data.support[0] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_Log, data.log);
|
||||
data.support[1] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_MainLoop, &data.loop);
|
||||
data.support[2] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_DataLoop, &data.loop);
|
||||
data.n_support = 3;
|
||||
|
||||
if ((handle = dlopen(argv[1], RTLD_NOW)) == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue