simple-endpoint: use WpProperties instead of parsing the spa_dict from the info structure
This commit is contained in:
@@ -232,15 +232,16 @@ on_proxy_node_augmented (WpProxy *proxy, GAsyncResult *res, gpointer data)
|
|||||||
{
|
{
|
||||||
WpPipewireSimpleEndpoint *self = data;
|
WpPipewireSimpleEndpoint *self = data;
|
||||||
GVariantDict d;
|
GVariantDict d;
|
||||||
|
g_autoptr (WpProperties) props = NULL;
|
||||||
|
|
||||||
if (!proxy_safe_augment_finish (self, proxy, res))
|
if (!proxy_safe_augment_finish (self, proxy, res))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
props = wp_proxy_node_get_properties (self->proxy_node);
|
||||||
|
|
||||||
/* Set the role and target name */
|
/* Set the role and target name */
|
||||||
self->role = g_strdup (spa_dict_lookup (
|
self->role = g_strdup (wp_properties_get (props, PW_KEY_MEDIA_ROLE));
|
||||||
wp_proxy_node_get_info (self->proxy_node)->props, "media.role"));
|
self->target = g_strdup (wp_properties_get (props, "target.name"));
|
||||||
self->target = g_strdup (spa_dict_lookup (
|
|
||||||
wp_proxy_node_get_info (self->proxy_node)->props, "target.name"));
|
|
||||||
|
|
||||||
/* Emit the ports */
|
/* Emit the ports */
|
||||||
emit_endpoint_ports(self);
|
emit_endpoint_ports(self);
|
||||||
|
Reference in New Issue
Block a user