From 84b752e304683bf0189a596767251db28c876f53 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Sat, 7 Sep 2019 11:30:08 +0300 Subject: [PATCH] simple-endpoint: use WpProperties instead of parsing the spa_dict from the info structure --- modules/module-pipewire/simple-endpoint.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/module-pipewire/simple-endpoint.c b/modules/module-pipewire/simple-endpoint.c index d3018761..7f282969 100644 --- a/modules/module-pipewire/simple-endpoint.c +++ b/modules/module-pipewire/simple-endpoint.c @@ -232,15 +232,16 @@ on_proxy_node_augmented (WpProxy *proxy, GAsyncResult *res, gpointer data) { WpPipewireSimpleEndpoint *self = data; GVariantDict d; + g_autoptr (WpProperties) props = NULL; if (!proxy_safe_augment_finish (self, proxy, res)) return; + props = wp_proxy_node_get_properties (self->proxy_node); + /* Set the role and target name */ - self->role = g_strdup (spa_dict_lookup ( - wp_proxy_node_get_info (self->proxy_node)->props, "media.role")); - self->target = g_strdup (spa_dict_lookup ( - wp_proxy_node_get_info (self->proxy_node)->props, "target.name")); + self->role = g_strdup (wp_properties_get (props, PW_KEY_MEDIA_ROLE)); + self->target = g_strdup (wp_properties_get (props, "target.name")); /* Emit the ports */ emit_endpoint_ports(self);