From afcf9f4f0c62bde13f5997b61e3855ad66db06ca Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Fri, 5 Jul 2019 12:56:15 +0300 Subject: [PATCH] softdsp-endpoint: actually register the streams --- modules/module-pw-audio-softdsp-endpoint.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/module-pw-audio-softdsp-endpoint.c b/modules/module-pw-audio-softdsp-endpoint.c index 433e78b8..0bbb1220 100644 --- a/modules/module-pw-audio-softdsp-endpoint.c +++ b/modules/module-pw-audio-softdsp-endpoint.c @@ -137,6 +137,7 @@ on_audio_dsp_converter_created(GObject *initable, GAsyncResult *res, g_autoptr (WpCore) core = wp_endpoint_get_core(WP_ENDPOINT(self)); const struct pw_node_info *target = NULL; const struct spa_audio_info_raw *format = NULL; + GVariantDict d; /* Get the proxy dsp converter */ self->converter = wp_pw_audio_dsp_new_finish(initable, res, NULL); @@ -152,6 +153,12 @@ on_audio_dsp_converter_created(GObject *initable, GAsyncResult *res, for (int i = 0; i < N_STREAMS; i++) { wp_pw_audio_dsp_new (WP_ENDPOINT(self), i, streams[i], self->direction, target, format, on_audio_dsp_stream_created, self); + + /* Register the stream */ + g_variant_dict_init (&d, NULL); + g_variant_dict_insert (&d, "id", "u", i); + g_variant_dict_insert (&d, "name", "s", streams[i]); + wp_endpoint_register_stream (WP_ENDPOINT (self), g_variant_dict_end (&d)); } } @@ -159,7 +166,6 @@ static void on_proxy_node_created(GObject *initable, GAsyncResult *res, gpointer data) { WpPwAudioSoftdspEndpoint *self = data; - GVariantDict d; g_autoptr (WpCore) core = wp_endpoint_get_core(WP_ENDPOINT(self)); g_autofree gchar *name = NULL; const struct spa_dict *props; @@ -179,12 +185,6 @@ on_proxy_node_created(GObject *initable, GAsyncResult *res, gpointer data) wp_proxy_node_get_info (self->proxy_node)->id); g_object_set (self, "name", name, NULL); - /* Register the stream */ - g_variant_dict_init (&d, NULL); - g_variant_dict_insert (&d, "id", "u", 0); - g_variant_dict_insert (&d, "name", "s", "default"); - wp_endpoint_register_stream (WP_ENDPOINT (self), g_variant_dict_end (&d)); - /* Create the converter proxy */ target = wp_proxy_node_get_info (self->proxy_node); g_return_if_fail (target); -- GitLab