mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pipewire-pulse: better default null sink description
This includes the sink_name and media class.
This commit is contained in:
parent
c092f0c1c4
commit
ebcdfe8f5d
1 changed files with 8 additions and 1 deletions
|
|
@ -203,7 +203,14 @@ static int load_module(struct client *client, const char *name, const char *argu
|
|||
pw_properties_set(props, PW_KEY_NODE_DESCRIPTION, str);
|
||||
pw_properties_set(props, "device.description", NULL);
|
||||
} else {
|
||||
pw_properties_set(props, PW_KEY_NODE_DESCRIPTION, "null sink");
|
||||
const char *name, *class;
|
||||
|
||||
name = pw_properties_get(props, PW_KEY_NODE_NAME);
|
||||
class = pw_properties_get(props, PW_KEY_MEDIA_CLASS);
|
||||
pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION,
|
||||
"%s%s%s%ssink",
|
||||
name, (name[0] == '\0') ? "" : " ",
|
||||
class ? class : "", (class && class[0] != '\0') ? " " : "");
|
||||
}
|
||||
pw_properties_set(props, PW_KEY_FACTORY_NAME, "support.null-audio-sink");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue