mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-09 05:08:04 +02:00
config-endpoint: create monitors after exporting
This fixes a failure to activate the monitors if we are using si-adapter directly instead of si-audio-softdsp-endpoint
This commit is contained in:
parent
aabf6beda7
commit
a1a718f8a1
1 changed files with 10 additions and 7 deletions
|
|
@ -53,10 +53,14 @@ get_streams_data (WpConfiguration *config, const char *file_name)
|
|||
return wp_config_parser_get_matched_data (parser, (gpointer)file_name);
|
||||
}
|
||||
|
||||
static void endpoint_activate_finish_cb (WpSessionItem * ep, GAsyncResult * res,
|
||||
WpConfigEndpointContext * self);
|
||||
|
||||
static void
|
||||
endpoint_export_finish_cb (WpSessionItem * ep, GAsyncResult * res,
|
||||
WpConfigEndpointContext * self)
|
||||
{
|
||||
WpSessionItem * monitor = NULL;
|
||||
g_autoptr (GError) error = NULL;
|
||||
gboolean export_ret = wp_session_item_export_finish (ep, res, &error);
|
||||
if (!export_ret) {
|
||||
|
|
@ -64,6 +68,12 @@ endpoint_export_finish_cb (WpSessionItem * ep, GAsyncResult * res,
|
|||
return;
|
||||
}
|
||||
|
||||
/* Activate monitor if any */
|
||||
monitor = g_object_get_qdata (G_OBJECT (ep), monitor_quark ());
|
||||
if (monitor)
|
||||
wp_session_item_activate (monitor,
|
||||
(GAsyncReadyCallback) endpoint_activate_finish_cb, self);
|
||||
|
||||
/* Emit the signal */
|
||||
g_signal_emit (self, signals[SIGNAL_ENDPOINT_CREATED], 0, ep);
|
||||
}
|
||||
|
|
@ -72,7 +82,6 @@ static void
|
|||
endpoint_activate_finish_cb (WpSessionItem * ep, GAsyncResult * res,
|
||||
WpConfigEndpointContext * self)
|
||||
{
|
||||
WpSessionItem * monitor = NULL;
|
||||
WpSession * session = NULL;
|
||||
g_autoptr (GError) error = NULL;
|
||||
gboolean activate_ret = wp_session_item_activate_finish (ep, res, &error);
|
||||
|
|
@ -81,12 +90,6 @@ endpoint_activate_finish_cb (WpSessionItem * ep, GAsyncResult * res,
|
|||
return;
|
||||
}
|
||||
|
||||
/* Activate monitor if any */
|
||||
monitor = g_object_get_qdata (G_OBJECT (ep), monitor_quark ());
|
||||
if (monitor)
|
||||
wp_session_item_activate (monitor,
|
||||
(GAsyncReadyCallback) endpoint_activate_finish_cb, self);
|
||||
|
||||
/* Get the session */
|
||||
session = g_object_get_qdata (G_OBJECT (ep), session_quark ());
|
||||
g_return_if_fail (session);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue