impl-node: assume Sink/Source nodes are passive

If not otherwise stated, assume the Sink and Source nodes
are passive.
This commit is contained in:
Wim Taymans 2023-03-28 11:50:18 +02:00
parent 6a64b4461e
commit 67999f0f9c

View file

@ -956,8 +956,14 @@ static void check_properties(struct pw_impl_node *node)
recalc_reason = "link group changed";
}
if ((str = pw_properties_get(node->properties, PW_KEY_NODE_PASSIVE)) == NULL)
if ((str = pw_properties_get(node->properties, PW_KEY_NODE_PASSIVE)) == NULL) {
if ((str = pw_properties_get(node->properties, PW_KEY_MEDIA_CLASS)) != NULL &&
(strstr(str, "/Sink") != NULL || strstr(str, "/Source") != NULL)) {
str = "true";
} else {
str = "false";
}
}
if (spa_streq(str, "out"))
node->out_passive = true;
else if (spa_streq(str, "in"))