mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
stream: flags should not override properties
Only set the properties from the flags when not already set before. Fixes #3382
This commit is contained in:
parent
dd78f3d5f7
commit
ae4042e7a2
1 changed files with 11 additions and 6 deletions
|
|
@ -1983,15 +1983,20 @@ pw_stream_connect(struct pw_stream *stream,
|
||||||
|
|
||||||
if (target_id != PW_ID_ANY)
|
if (target_id != PW_ID_ANY)
|
||||||
/* XXX this is deprecated but still used by the portal and its apps */
|
/* XXX this is deprecated but still used by the portal and its apps */
|
||||||
pw_properties_setf(stream->properties, PW_KEY_NODE_TARGET, "%d", target_id);
|
if (pw_properties_get(stream->properties, PW_KEY_NODE_TARGET) == NULL)
|
||||||
|
pw_properties_setf(stream->properties, PW_KEY_NODE_TARGET, "%d", target_id);
|
||||||
if (flags & PW_STREAM_FLAG_AUTOCONNECT)
|
if (flags & PW_STREAM_FLAG_AUTOCONNECT)
|
||||||
pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, "true");
|
if (pw_properties_get(stream->properties, PW_KEY_NODE_AUTOCONNECT) == NULL)
|
||||||
|
pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, "true");
|
||||||
|
if (flags & PW_STREAM_FLAG_EXCLUSIVE)
|
||||||
|
if (pw_properties_get(stream->properties, PW_KEY_NODE_EXCLUSIVE) == NULL)
|
||||||
|
pw_properties_set(stream->properties, PW_KEY_NODE_EXCLUSIVE, "true");
|
||||||
|
if (flags & PW_STREAM_FLAG_DONT_RECONNECT)
|
||||||
|
if (pw_properties_get(stream->properties, PW_KEY_NODE_DONT_RECONNECT) == NULL)
|
||||||
|
pw_properties_set(stream->properties, PW_KEY_NODE_DONT_RECONNECT, "true");
|
||||||
|
|
||||||
if (flags & PW_STREAM_FLAG_DRIVER)
|
if (flags & PW_STREAM_FLAG_DRIVER)
|
||||||
pw_properties_set(stream->properties, PW_KEY_NODE_DRIVER, "true");
|
pw_properties_set(stream->properties, PW_KEY_NODE_DRIVER, "true");
|
||||||
if (flags & PW_STREAM_FLAG_EXCLUSIVE)
|
|
||||||
pw_properties_set(stream->properties, PW_KEY_NODE_EXCLUSIVE, "true");
|
|
||||||
if (flags & PW_STREAM_FLAG_DONT_RECONNECT)
|
|
||||||
pw_properties_set(stream->properties, PW_KEY_NODE_DONT_RECONNECT, "true");
|
|
||||||
if (flags & PW_STREAM_FLAG_TRIGGER) {
|
if (flags & PW_STREAM_FLAG_TRIGGER) {
|
||||||
pw_properties_set(stream->properties, PW_KEY_NODE_TRIGGER, "true");
|
pw_properties_set(stream->properties, PW_KEY_NODE_TRIGGER, "true");
|
||||||
impl->trigger = true;
|
impl->trigger = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue