mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-05 06:38:01 +02:00
config-endpoint: destroy the endpoint when its associated node is destroyed
This commit is contained in:
parent
5ea7e6fc0b
commit
21f6309621
1 changed files with 11 additions and 0 deletions
|
|
@ -207,6 +207,15 @@ on_node_added (WpObjectManager *om, WpProxy *proxy, gpointer d)
|
|||
streams_data ? g_steal_pointer (&streams_ep) : g_steal_pointer (&ep));
|
||||
}
|
||||
|
||||
static void
|
||||
on_node_removed (WpObjectManager *om, WpProxy *proxy, gpointer d)
|
||||
{
|
||||
WpConfigEndpointContext *self = d;
|
||||
|
||||
/* Remove the endpoint */
|
||||
g_hash_table_remove (self->endpoints, proxy);
|
||||
}
|
||||
|
||||
static void
|
||||
wp_config_endpoint_context_activate (WpPlugin * plugin)
|
||||
{
|
||||
|
|
@ -243,6 +252,8 @@ wp_config_endpoint_context_activate (WpPlugin * plugin)
|
|||
WP_PROXY_FEATURES_STANDARD);
|
||||
g_signal_connect_object (self->nodes_om, "object-added",
|
||||
G_CALLBACK (on_node_added), self, 0);
|
||||
g_signal_connect_object (self->nodes_om, "object-removed",
|
||||
G_CALLBACK (on_node_removed), self, 0);
|
||||
wp_core_install_object_manager (core, self->nodes_om);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue