Commit d1495f6d authored by Julian Bouzas's avatar Julian Bouzas
Browse files

stream: make sure the ports are augmented before finishing

parent 5820ffa7
Pipeline #85008 passed with stage
in 6 minutes and 13 seconds
......@@ -140,14 +140,23 @@ audio_stream_event_param (WpProxy *proxy, int seq, uint32_t id,
}
}
static void
on_ports_done (WpProxy *proxy, GAsyncResult *res, WpAudioStream *self)
{
g_debug ("%s:%p port config done", G_OBJECT_TYPE_NAME (self), self);
wp_audio_stream_init_task_finish (self, NULL);
}
static void
on_ports_changed (WpObjectManager *om, WpAudioStream *self)
{
WpAudioStreamPrivate *priv = wp_audio_stream_get_instance_private (self);
if (priv->port_config_done) {
g_debug ("%s:%p port config done", G_OBJECT_TYPE_NAME (self), self);
wp_audio_stream_init_task_finish (self, NULL);
/* Ports are added, but they might not be augmented yet, so make a sync
* to make sure they are augmented before finishing */
wp_proxy_sync (WP_PROXY (priv->proxy), NULL,
(GAsyncReadyCallback) on_ports_done, self);
g_signal_handlers_disconnect_by_func (priv->ports_om, on_ports_changed,
self);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment