filter-chain: use node.name in media.name instead of id

The node name is likely more stable when specified, which is better
because media.name is used to restore volumes.
This commit is contained in:
Wim Taymans 2022-01-03 13:12:29 +01:00
parent 81f1a6c511
commit 9e207a2deb

View file

@ -1732,11 +1732,11 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
}
if (pw_properties_get(impl->capture_props, PW_KEY_MEDIA_NAME) == NULL)
pw_properties_setf(impl->capture_props, PW_KEY_MEDIA_NAME, "filter input %u",
id);
pw_properties_setf(impl->capture_props, PW_KEY_MEDIA_NAME, "filter input %s",
pw_properties_get(impl->capture_props, PW_KEY_NODE_NAME));
if (pw_properties_get(impl->playback_props, PW_KEY_MEDIA_NAME) == NULL)
pw_properties_setf(impl->playback_props, PW_KEY_MEDIA_NAME, "filter output %u",
id);
pw_properties_setf(impl->playback_props, PW_KEY_MEDIA_NAME, "filter output %s",
pw_properties_get(impl->playback_props, PW_KEY_NODE_NAME));
impl->core = pw_context_get_object(impl->context, PW_TYPE_INTERFACE_Core);
if (impl->core == NULL) {