mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
pulse-server: Make node.description
If no node.description is given in the Properties, use the node.name to make a nicer name. Fixes #2086
This commit is contained in:
parent
cec420478a
commit
136989eaa6
2 changed files with 16 additions and 0 deletions
|
|
@ -217,6 +217,14 @@ struct module *create_module_ladspa_sink(struct impl *impl, const char *argument
|
|||
if (pw_properties_get(capture_props, PW_KEY_DEVICE_CLASS) == NULL)
|
||||
pw_properties_set(capture_props, PW_KEY_DEVICE_CLASS, "filter");
|
||||
|
||||
if ((str = pw_properties_get(capture_props, PW_KEY_NODE_DESCRIPTION)) == NULL) {
|
||||
str = pw_properties_get(capture_props, PW_KEY_NODE_NAME);
|
||||
pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION,
|
||||
"%s Sink", str);
|
||||
} else {
|
||||
pw_properties_set(props, PW_KEY_NODE_DESCRIPTION, str);
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "master")) != NULL ||
|
||||
(str = pw_properties_get(props, "sink_master")) != NULL) {
|
||||
pw_properties_set(playback_props, PW_KEY_NODE_TARGET, str);
|
||||
|
|
|
|||
|
|
@ -217,6 +217,14 @@ struct module *create_module_ladspa_source(struct impl *impl, const char *argume
|
|||
if (pw_properties_get(playback_props, PW_KEY_DEVICE_CLASS) == NULL)
|
||||
pw_properties_set(playback_props, PW_KEY_DEVICE_CLASS, "filter");
|
||||
|
||||
if ((str = pw_properties_get(playback_props, PW_KEY_NODE_DESCRIPTION)) == NULL) {
|
||||
str = pw_properties_get(playback_props, PW_KEY_NODE_NAME);
|
||||
pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION,
|
||||
"%s Source", str);
|
||||
} else {
|
||||
pw_properties_set(props, PW_KEY_NODE_DESCRIPTION, str);
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "master")) != NULL ||
|
||||
(str = pw_properties_get(props, "source_master")) != NULL) {
|
||||
pw_properties_set(capture_props, PW_KEY_NODE_TARGET, str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue