mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-08 05:34:03 -04:00
impl-node: remove the can_suspend boolean
Sink and Sources can now be implemented as the follow passive mode, they won't activate anything themselves but follow the state of the peer.
This commit is contained in:
parent
118d8574c8
commit
784ad934a4
3 changed files with 7 additions and 11 deletions
|
|
@ -599,9 +599,7 @@ again:
|
|||
|
||||
/* first look at all nodes and decide which one should be runnable */
|
||||
spa_list_for_each(n, &context->node_list, link) {
|
||||
/* we don't check suspendable nodes, they need to be made
|
||||
* runnable from other nodes */
|
||||
if (n->exported || !n->active || n->can_suspend)
|
||||
if (n->exported || !n->active)
|
||||
continue;
|
||||
check_runnable(context, n);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1261,14 +1261,13 @@ static void check_properties(struct pw_impl_node *node)
|
|||
SPA_FLAG_UPDATE(node->rt.target.activation->flags, PW_NODE_ACTIVATION_FLAG_ASYNC, async);
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(node->properties, PW_KEY_MEDIA_CLASS)) != NULL &&
|
||||
(strstr(str, "/Sink") != NULL || strstr(str, "/Source") != NULL)) {
|
||||
node->can_suspend = true;
|
||||
} else {
|
||||
node->can_suspend = false;
|
||||
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 = "follow";
|
||||
else
|
||||
str = "false";
|
||||
}
|
||||
if ((str = pw_properties_get(node->properties, PW_KEY_NODE_PASSIVE)) == NULL)
|
||||
str = "false";
|
||||
|
||||
if (spa_streq(str, "out")) {
|
||||
node->passive_away[SPA_DIRECTION_OUTPUT] = true;
|
||||
|
|
|
|||
|
|
@ -778,7 +778,6 @@ struct pw_impl_node {
|
|||
unsigned int forced_quantum:1;
|
||||
unsigned int trigger:1; /**< has the TRIGGER property and needs an extra
|
||||
* trigger to start processing. */
|
||||
unsigned int can_suspend:1;
|
||||
unsigned int checked; /**< for sorting */
|
||||
unsigned int sync:1; /**< the sync-groups are active */
|
||||
unsigned int async:1; /**< async processing, one cycle latency */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue