softdsp-endpoint: actually register the streams
This commit is contained in:

committed by
Julian Bouzas

parent
7d1e860b7d
commit
afcf9f4f0c
@@ -137,6 +137,7 @@ on_audio_dsp_converter_created(GObject *initable, GAsyncResult *res,
|
|||||||
g_autoptr (WpCore) core = wp_endpoint_get_core(WP_ENDPOINT(self));
|
g_autoptr (WpCore) core = wp_endpoint_get_core(WP_ENDPOINT(self));
|
||||||
const struct pw_node_info *target = NULL;
|
const struct pw_node_info *target = NULL;
|
||||||
const struct spa_audio_info_raw *format = NULL;
|
const struct spa_audio_info_raw *format = NULL;
|
||||||
|
GVariantDict d;
|
||||||
|
|
||||||
/* Get the proxy dsp converter */
|
/* Get the proxy dsp converter */
|
||||||
self->converter = wp_pw_audio_dsp_new_finish(initable, res, NULL);
|
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++) {
|
for (int i = 0; i < N_STREAMS; i++) {
|
||||||
wp_pw_audio_dsp_new (WP_ENDPOINT(self), i, streams[i], self->direction,
|
wp_pw_audio_dsp_new (WP_ENDPOINT(self), i, streams[i], self->direction,
|
||||||
target, format, on_audio_dsp_stream_created, self);
|
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)
|
on_proxy_node_created(GObject *initable, GAsyncResult *res, gpointer data)
|
||||||
{
|
{
|
||||||
WpPwAudioSoftdspEndpoint *self = data;
|
WpPwAudioSoftdspEndpoint *self = data;
|
||||||
GVariantDict d;
|
|
||||||
g_autoptr (WpCore) core = wp_endpoint_get_core(WP_ENDPOINT(self));
|
g_autoptr (WpCore) core = wp_endpoint_get_core(WP_ENDPOINT(self));
|
||||||
g_autofree gchar *name = NULL;
|
g_autofree gchar *name = NULL;
|
||||||
const struct spa_dict *props;
|
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);
|
wp_proxy_node_get_info (self->proxy_node)->id);
|
||||||
g_object_set (self, "name", name, NULL);
|
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 */
|
/* Create the converter proxy */
|
||||||
target = wp_proxy_node_get_info (self->proxy_node);
|
target = wp_proxy_node_get_info (self->proxy_node);
|
||||||
g_return_if_fail (target);
|
g_return_if_fail (target);
|
||||||
|
Reference in New Issue
Block a user