Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wireplumber
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
wireplumber
Commits
32078117
Commit
32078117
authored
5 years ago
by
Julian Bouzas
Browse files
Options
Downloads
Patches
Plain Diff
modules: disconnect the signals when the endpoints are destroyed
parent
7aded3a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/module-pipewire/simple-endpoint.c
+10
-5
10 additions, 5 deletions
modules/module-pipewire/simple-endpoint.c
modules/module-pw-audio-softdsp-endpoint.c
+10
-4
10 additions, 4 deletions
modules/module-pw-audio-softdsp-endpoint.c
with
20 additions
and
9 deletions
modules/module-pipewire/simple-endpoint.c
+
10
−
5
View file @
32078117
...
...
@@ -33,6 +33,9 @@ struct _WpPipewireSimpleEndpoint
/* The remote pipewire */
WpRemotePipewire
*
remote_pipewire
;
/* Handler */
gulong
proxy_node_done_handler_id
;
/* Proxies */
WpProxyNode
*
proxy_node
;
struct
spa_hook
node_proxy_listener
;
...
...
@@ -145,9 +148,11 @@ on_proxy_port_created(GObject *initable, GAsyncResult *res, gpointer data)
g_ptr_array_add
(
self
->
proxies_port
,
proxy_port
);
/* Register the done callback */
g_signal_connect
(
self
->
proxy_node
,
"done"
,
(
GCallback
)
on_all_ports_done
,
self
);
wp_proxy_sync
(
WP_PROXY
(
self
->
proxy_node
));
if
(
!
self
->
proxy_node_done_handler_id
)
{
self
->
proxy_node_done_handler_id
=
g_signal_connect_object
(
self
->
proxy_node
,
"done"
,
(
GCallback
)
on_all_ports_done
,
self
,
0
);
wp_proxy_sync
(
WP_PROXY
(
self
->
proxy_node
));
}
}
static
void
...
...
@@ -267,8 +272,8 @@ wp_simple_endpoint_init_async (GAsyncInitable *initable, int io_priority,
/* Register a port_added callback */
self
->
remote_pipewire
=
wp_core_get_global
(
core
,
WP_GLOBAL_REMOTE_PIPEWIRE
);
g_return_if_fail
(
self
->
remote_pipewire
);
g_signal_connect
(
self
->
remote_pipewire
,
"global-added::port"
,
(
GCallback
)
on_port_added
,
self
);
g_signal_connect
_object
(
self
->
remote_pipewire
,
"global-added::port"
,
(
GCallback
)
on_port_added
,
self
,
0
);
/* Create the proxy node async */
node_proxy
=
wp_remote_pipewire_proxy_bind
(
self
->
remote_pipewire
,
...
...
This diff is collapsed.
Click to expand it.
modules/module-pw-audio-softdsp-endpoint.c
+
10
−
4
View file @
32078117
...
...
@@ -35,6 +35,9 @@ struct _WpPwAudioSoftdspEndpoint
/* The remote pipewire */
WpRemotePipewire
*
remote_pipewire
;
/* Handler */
gulong
proxy_dsp_done_handler_id
;
/* temporary method to select which endpoint
* is going to be the default input/output */
gboolean
selected
;
...
...
@@ -438,8 +441,11 @@ on_proxy_dsp_port_created(GObject *initable, GAsyncResult *res, gpointer data)
g_ptr_array_add
(
self
->
proxies_dsp_port
,
proxy_dsp_port
);
/* Register a callback to know when all the dsp ports have been emitted */
g_signal_connect
(
self
->
proxy_dsp
,
"done"
,
(
GCallback
)
on_proxy_dsp_done
,
self
);
wp_proxy_sync
(
WP_PROXY
(
self
->
proxy_dsp
));
if
(
!
self
->
proxy_dsp_done_handler_id
)
{
self
->
proxy_dsp_done_handler_id
=
g_signal_connect_object
(
self
->
proxy_dsp
,
"done"
,
(
GCallback
)
on_proxy_dsp_done
,
self
,
0
);
wp_proxy_sync
(
WP_PROXY
(
self
->
proxy_dsp
));
}
}
static
void
...
...
@@ -641,8 +647,8 @@ wp_endpoint_init_async (GAsyncInitable *initable, int io_priority,
/* Register a port_added callback */
self
->
remote_pipewire
=
wp_core_get_global
(
core
,
WP_GLOBAL_REMOTE_PIPEWIRE
);
g_return_if_fail
(
self
->
remote_pipewire
);
g_signal_connect
(
self
->
remote_pipewire
,
"global-added::port"
,
(
GCallback
)
on_port_added
,
self
);
g_signal_connect
_object
(
self
->
remote_pipewire
,
"global-added::port"
,
(
GCallback
)
on_port_added
,
self
,
0
);
/* Call the parent interface */
wp_endpoint_parent_interface
->
init_async
(
initable
,
io_priority
,
cancellable
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment