mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
modules: ensure node.name and description are set
Most apps need this and some even crash when they are not set.
This commit is contained in:
parent
bb2f637839
commit
abf37f618e
5 changed files with 31 additions and 0 deletions
|
|
@ -438,6 +438,12 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL)
|
||||
pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");
|
||||
|
||||
if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL)
|
||||
pw_properties_setf(props, PW_KEY_NODE_NAME, "loopback-%u", id);
|
||||
if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL)
|
||||
pw_properties_set(props, PW_KEY_NODE_DESCRIPTION,
|
||||
pw_properties_get(props, PW_KEY_NODE_NAME));
|
||||
|
||||
if ((str = pw_properties_get(props, "capture.props")) != NULL)
|
||||
pw_properties_update_string(impl->capture_props, str, strlen(str));
|
||||
if ((str = pw_properties_get(props, "playback.props")) != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue