mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
impl-node: only increment pending when not async
Place the async state of the node in its activation. Don't increment the pending state of the driver when an async node is found because the async nodes will not trigger the driver when they complete. See !2104
This commit is contained in:
parent
d4de97a473
commit
1ef6db7d54
2 changed files with 4 additions and 1 deletions
|
|
@ -1206,6 +1206,7 @@ static void check_properties(struct pw_impl_node *node)
|
||||||
if (async != node->async) {
|
if (async != node->async) {
|
||||||
pw_log_info("%p: async %d -> %d", node, node->async, async);
|
pw_log_info("%p: async %d -> %d", node, node->async, async);
|
||||||
node->async = async;
|
node->async = async;
|
||||||
|
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 &&
|
if ((str = pw_properties_get(node->properties, PW_KEY_MEDIA_CLASS)) != NULL &&
|
||||||
|
|
@ -2106,7 +2107,8 @@ retry_status:
|
||||||
if (SPA_UNLIKELY(!SPA_ATOMIC_CAS(ta->status, old_status, PW_NODE_ACTIVATION_NOT_TRIGGERED)))
|
if (SPA_UNLIKELY(!SPA_ATOMIC_CAS(ta->status, old_status, PW_NODE_ACTIVATION_NOT_TRIGGERED)))
|
||||||
goto retry_status;
|
goto retry_status;
|
||||||
|
|
||||||
pending++;
|
if (!SPA_FLAG_IS_SET(ta->flags, PW_NODE_ACTIVATION_FLAG_ASYNC))
|
||||||
|
pending++;
|
||||||
|
|
||||||
if (old_status == PW_NODE_ACTIVATION_TRIGGERED ||
|
if (old_status == PW_NODE_ACTIVATION_TRIGGERED ||
|
||||||
old_status == PW_NODE_ACTIVATION_AWAKE) {
|
old_status == PW_NODE_ACTIVATION_AWAKE) {
|
||||||
|
|
|
||||||
|
|
@ -618,6 +618,7 @@ struct pw_node_activation {
|
||||||
uint32_t driver_id; /* the current node driver id */
|
uint32_t driver_id; /* the current node driver id */
|
||||||
#define PW_NODE_ACTIVATION_FLAG_NONE 0
|
#define PW_NODE_ACTIVATION_FLAG_NONE 0
|
||||||
#define PW_NODE_ACTIVATION_FLAG_PROFILER (1<<0) /* the profiler is running */
|
#define PW_NODE_ACTIVATION_FLAG_PROFILER (1<<0) /* the profiler is running */
|
||||||
|
#define PW_NODE_ACTIVATION_FLAG_ASYNC (1<<1) /* the node is async */
|
||||||
uint32_t flags; /* extra flags */
|
uint32_t flags; /* extra flags */
|
||||||
struct spa_io_position position; /* contains current position and segment info.
|
struct spa_io_position position; /* contains current position and segment info.
|
||||||
* extra info is updated by nodes that have set
|
* extra info is updated by nodes that have set
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue