mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
Use mapper to make object id
Reuse object ids by using a mapper Simpify the uri struct a little.
This commit is contained in:
parent
f42268b9a5
commit
e7cae649aa
14 changed files with 61 additions and 64 deletions
|
|
@ -227,7 +227,7 @@ on_global_added (PinosListener *listener,
|
|||
{
|
||||
ModuleImpl *impl = SPA_CONTAINER_OF (listener, ModuleImpl, global_added);
|
||||
|
||||
if (global->type == impl->core->registry.uri.node) {
|
||||
if (global->type == impl->core->uri.node) {
|
||||
PinosNode *node = global->object;
|
||||
on_node_added (impl, node);
|
||||
}
|
||||
|
|
@ -240,7 +240,7 @@ on_global_removed (PinosListener *listener,
|
|||
{
|
||||
ModuleImpl *impl = SPA_CONTAINER_OF (listener, ModuleImpl, global_removed);
|
||||
|
||||
if (global->type == impl->core->registry.uri.node) {
|
||||
if (global->type == impl->core->uri.node) {
|
||||
PinosNode *node = global->object;
|
||||
on_node_removed (impl, node);
|
||||
}
|
||||
|
|
@ -275,7 +275,7 @@ module_new (PinosCore *core,
|
|||
pinos_signal_add (&core->port_unlinked, &impl->port_unlinked, on_link_port_unlinked);
|
||||
pinos_signal_add (&core->link_state_changed, &impl->link_state_changed, on_link_state_changed);
|
||||
|
||||
impl->uri.module = spa_id_map_get_id (core->registry.map, MODULE_URI);
|
||||
impl->uri.module = spa_id_map_get_id (core->uri.map, MODULE_URI);
|
||||
|
||||
impl->global = pinos_core_add_global (core,
|
||||
impl->uri.module,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue