Skip to content
Snippets Groups Projects
Commit d6ed1747 authored by Julian Bouzas's avatar Julian Bouzas
Browse files

modules: always use the node name when creating endpoints

parent cd3a414e
No related branches found
No related tags found
No related merge requests found
...@@ -110,8 +110,7 @@ on_node_added (WpObjectManager *om, WpProxy *proxy, struct impl *impl) ...@@ -110,8 +110,7 @@ on_node_added (WpObjectManager *om, WpProxy *proxy, struct impl *impl)
/* Set the properties */ /* Set the properties */
g_variant_builder_init (&b, G_VARIANT_TYPE_VARDICT); g_variant_builder_init (&b, G_VARIANT_TYPE_VARDICT);
g_variant_builder_add (&b, "{sv}", g_variant_builder_add (&b, "{sv}",
"name", g_variant_new_take_string (g_strdup_printf ( "name", g_variant_new_take_string (g_strdup_printf ("%s", name)));
"Alsa %u (%s)", wp_proxy_get_global_id (proxy), name)));
g_variant_builder_add (&b, "{sv}", g_variant_builder_add (&b, "{sv}",
"media-class", g_variant_new_string (media_class)); "media-class", g_variant_new_string (media_class));
g_variant_builder_add (&b, "{sv}", g_variant_builder_add (&b, "{sv}",
......
...@@ -56,7 +56,6 @@ on_node_added (WpObjectManager *om, WpProxy *proxy, gpointer d) ...@@ -56,7 +56,6 @@ on_node_added (WpObjectManager *om, WpProxy *proxy, gpointer d)
enum pw_direction direction; enum pw_direction direction;
GVariantBuilder b; GVariantBuilder b;
g_autoptr (GVariant) endpoint_props = NULL; g_autoptr (GVariant) endpoint_props = NULL;
guint32 id = wp_proxy_get_global_id (proxy);
g_autoptr (WpProperties) props = wp_proxy_get_global_properties (proxy); g_autoptr (WpProperties) props = wp_proxy_get_global_properties (proxy);
g_autoptr (WpCore) core = NULL; g_autoptr (WpCore) core = NULL;
...@@ -85,9 +84,7 @@ on_node_added (WpObjectManager *om, WpProxy *proxy, gpointer d) ...@@ -85,9 +84,7 @@ on_node_added (WpObjectManager *om, WpProxy *proxy, gpointer d)
/* Set the properties */ /* Set the properties */
g_variant_builder_init (&b, G_VARIANT_TYPE_VARDICT); g_variant_builder_init (&b, G_VARIANT_TYPE_VARDICT);
g_variant_builder_add (&b, "{sv}", g_variant_builder_add (&b, "{sv}",
"name", name ? "name", g_variant_new_take_string (g_strdup_printf ("%s", name)));
g_variant_new_take_string (g_strdup_printf ("Stream %u (%s)", id, name)) :
g_variant_new_take_string (g_strdup_printf ("Stream %u", id)));
g_variant_builder_add (&b, "{sv}", g_variant_builder_add (&b, "{sv}",
"media-class", g_variant_new_string (media_class)); "media-class", g_variant_new_string (media_class));
g_variant_builder_add (&b, "{sv}", g_variant_builder_add (&b, "{sv}",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment