mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
stream: use PIPEWIRE_AUTOCONNECT env variable
Use the PIPEWIRE_AUTOCONNECT environment variable to set the value of the NODE_AUTOCONNECT property. This way, you can start any stream based app with PIPEWIRE_AUTOCONNECT=false to disable the session manager autoconnect. See #964
This commit is contained in:
parent
3878ad921a
commit
ec0b2b8dd7
1 changed files with 4 additions and 2 deletions
|
|
@ -1554,8 +1554,10 @@ pw_stream_connect(struct pw_stream *stream,
|
|||
pw_properties_setf(stream->properties, PW_KEY_NODE_TARGET, "%d", target_id);
|
||||
else if ((str = getenv("PIPEWIRE_NODE")) != NULL)
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_TARGET, str);
|
||||
if (flags & PW_STREAM_FLAG_AUTOCONNECT)
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, "true");
|
||||
if (flags & PW_STREAM_FLAG_AUTOCONNECT) {
|
||||
str = getenv("PIPEWIRE_AUTOCONNECT");
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, str ? str : "true");
|
||||
}
|
||||
if (flags & PW_STREAM_FLAG_DRIVER)
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_DRIVER, "true");
|
||||
if (flags & PW_STREAM_FLAG_EXCLUSIVE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue