stream: Add node.autoconnect stream.properties

If the node.autoconnect property is set in the stream.properties,
ignore the AUTOCONNECT flag value. This makes it possible to
force AUTOCONNECT either way.

See #964
This commit is contained in:
Wim Taymans 2021-03-29 14:19:34 +02:00
parent ec0b2b8dd7
commit f78be58568
4 changed files with 5 additions and 1 deletions

View file

@ -70,6 +70,7 @@ filter.properties = {
stream.properties = {
#node.latency = 1024/48000
#node.autoconnect = true
#resample.quality = 4
#channelmix.normalize = false
#channelmix.mix-lfe = true

View file

@ -59,6 +59,7 @@ filter.properties = {
stream.properties = {
#node.latency = 1024/48000
#node.autoconnect = true
#resample.quality = 4
#channelmix.normalize = false
#channelmix.mix-lfe = false

View file

@ -46,6 +46,7 @@ context.modules = [
stream.properties = {
#node.latency = 1024/48000
#node.autoconnect = true
#resample.quality = 4
#channelmix.normalize = false
#channelmix.mix-lfe = false

View file

@ -1554,7 +1554,8 @@ 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) {
if ((flags & PW_STREAM_FLAG_AUTOCONNECT) &&
pw_properties_get(stream->properties, PW_KEY_NODE_AUTOCONNECT) == NULL) {
str = getenv("PIPEWIRE_AUTOCONNECT");
pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, str ? str : "true");
}