mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
stream: handle node.name fallback better
If we don't have extra properties, set the node.name to the stream name if it was not otherwise present.
This commit is contained in:
parent
63af3a4b5c
commit
0b42ec714d
2 changed files with 12 additions and 8 deletions
|
|
@ -1255,10 +1255,12 @@ filter_new(struct pw_context *context, const char *name,
|
|||
spa_hook_list_init(&impl->hooks);
|
||||
this->properties = props;
|
||||
|
||||
if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL && extra) {
|
||||
str = pw_properties_get(extra, PW_KEY_APP_NAME);
|
||||
if (str == NULL)
|
||||
str = pw_properties_get(extra, PW_KEY_APP_PROCESS_BINARY);
|
||||
if ((str = pw_properties_get(props, PW_KEY_NODE_NAME)) == NULL) {
|
||||
if (extra) {
|
||||
str = pw_properties_get(extra, PW_KEY_APP_NAME);
|
||||
if (str == NULL)
|
||||
str = pw_properties_get(extra, PW_KEY_APP_PROCESS_BINARY);
|
||||
}
|
||||
if (str == NULL)
|
||||
str = name;
|
||||
pw_properties_set(props, PW_KEY_NODE_NAME, str);
|
||||
|
|
|
|||
|
|
@ -1544,10 +1544,12 @@ stream_new(struct pw_context *context, const char *name,
|
|||
|
||||
if (pw_properties_get(props, PW_KEY_STREAM_IS_LIVE) == NULL)
|
||||
pw_properties_set(props, PW_KEY_STREAM_IS_LIVE, "true");
|
||||
if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL && extra) {
|
||||
str = pw_properties_get(extra, PW_KEY_APP_NAME);
|
||||
if (str == NULL)
|
||||
str = pw_properties_get(extra, PW_KEY_APP_PROCESS_BINARY);
|
||||
if ((str = pw_properties_get(props, PW_KEY_NODE_NAME)) == NULL) {
|
||||
if (extra) {
|
||||
str = pw_properties_get(extra, PW_KEY_APP_NAME);
|
||||
if (str == NULL)
|
||||
str = pw_properties_get(extra, PW_KEY_APP_PROCESS_BINARY);
|
||||
}
|
||||
if (str == NULL)
|
||||
str = name;
|
||||
pw_properties_set(props, PW_KEY_NODE_NAME, str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue