impl-link: also update node id in properties

The link might have been made using the node name/nick/description but
we always want to place the id in the properties to make it easier for
apps to handle the relations between objects.

See #1723
This commit is contained in:
Wim Taymans 2021-10-15 17:56:47 +02:00
parent 061ab16415
commit e1deecc3cd

View file

@ -1378,8 +1378,10 @@ int pw_impl_link_register(struct pw_impl_link *link,
link->info.id = link->global->id;
pw_properties_setf(link->properties, PW_KEY_OBJECT_ID, "%d", link->info.id);
pw_properties_setf(link->properties, PW_KEY_LINK_OUTPUT_PORT, "%d", link->info.output_port_id);
pw_properties_setf(link->properties, PW_KEY_LINK_INPUT_PORT, "%d", link->info.input_port_id);
pw_properties_setf(link->properties, PW_KEY_LINK_OUTPUT_NODE, "%u", link->info.output_node_id);
pw_properties_setf(link->properties, PW_KEY_LINK_OUTPUT_PORT, "%u", link->info.output_port_id);
pw_properties_setf(link->properties, PW_KEY_LINK_INPUT_NODE, "%u", link->info.input_node_id);
pw_properties_setf(link->properties, PW_KEY_LINK_INPUT_PORT, "%u", link->info.input_port_id);
link->info.props = &link->properties->dict;
pw_global_update_keys(link->global, link->info.props, keys);