mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -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);
|
spa_hook_list_init(&impl->hooks);
|
||||||
this->properties = props;
|
this->properties = props;
|
||||||
|
|
||||||
if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL && extra) {
|
if ((str = pw_properties_get(props, PW_KEY_NODE_NAME)) == NULL) {
|
||||||
str = pw_properties_get(extra, PW_KEY_APP_NAME);
|
if (extra) {
|
||||||
if (str == NULL)
|
str = pw_properties_get(extra, PW_KEY_APP_NAME);
|
||||||
str = pw_properties_get(extra, PW_KEY_APP_PROCESS_BINARY);
|
if (str == NULL)
|
||||||
|
str = pw_properties_get(extra, PW_KEY_APP_PROCESS_BINARY);
|
||||||
|
}
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
str = name;
|
str = name;
|
||||||
pw_properties_set(props, PW_KEY_NODE_NAME, str);
|
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)
|
if (pw_properties_get(props, PW_KEY_STREAM_IS_LIVE) == NULL)
|
||||||
pw_properties_set(props, PW_KEY_STREAM_IS_LIVE, "true");
|
pw_properties_set(props, PW_KEY_STREAM_IS_LIVE, "true");
|
||||||
if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL && extra) {
|
if ((str = pw_properties_get(props, PW_KEY_NODE_NAME)) == NULL) {
|
||||||
str = pw_properties_get(extra, PW_KEY_APP_NAME);
|
if (extra) {
|
||||||
if (str == NULL)
|
str = pw_properties_get(extra, PW_KEY_APP_NAME);
|
||||||
str = pw_properties_get(extra, PW_KEY_APP_PROCESS_BINARY);
|
if (str == NULL)
|
||||||
|
str = pw_properties_get(extra, PW_KEY_APP_PROCESS_BINARY);
|
||||||
|
}
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
str = name;
|
str = name;
|
||||||
pw_properties_set(props, PW_KEY_NODE_NAME, str);
|
pw_properties_set(props, PW_KEY_NODE_NAME, str);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue