mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
graph: make pending/required fields signed
So that we can check for negative value. Also don't signal incomplete graph when we signaled more than expected, this can happen when we add new nodes in the current cycle and then triggered the driver.
This commit is contained in:
parent
5e5bab4680
commit
43257e8676
3 changed files with 12 additions and 12 deletions
|
|
@ -46,8 +46,8 @@ struct spa_graph_port;
|
|||
|
||||
struct spa_graph_state {
|
||||
int status; /**< current status */
|
||||
uint32_t required; /**< required number of signals */
|
||||
uint32_t pending; /**< number of pending signals */
|
||||
int32_t required; /**< required number of signals */
|
||||
int32_t pending; /**< number of pending signals */
|
||||
};
|
||||
|
||||
static inline void spa_graph_state_reset(struct spa_graph_state *state)
|
||||
|
|
|
|||
|
|
@ -1312,8 +1312,8 @@ static int node_ready(void *data, int status)
|
|||
uint32_t owner[2], reposition_owner;
|
||||
uint64_t min_timeout = UINT64_MAX;
|
||||
|
||||
if (a->state[0].pending != 0) {
|
||||
pw_log_warn(NAME" %p: graph not finished", node);
|
||||
if (a->state[0].pending > 0) {
|
||||
pw_log_warn(NAME" %p: graph not finished: pending %d", node, a->state[0].pending);
|
||||
pw_context_driver_emit_incomplete(node->context, node);
|
||||
dump_states(node);
|
||||
node->rt.target.signal(node->rt.target.data);
|
||||
|
|
|
|||
|
|
@ -371,8 +371,8 @@ struct pw_impl_module {
|
|||
|
||||
struct pw_node_activation_state {
|
||||
int status; /**< current status */
|
||||
uint32_t required; /**< required number of signals */
|
||||
uint32_t pending; /**< number of pending signals */
|
||||
int32_t required; /**< required number of signals */
|
||||
int32_t pending; /**< number of pending signals */
|
||||
};
|
||||
|
||||
static inline void pw_node_activation_state_reset(struct pw_node_activation_state *state)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue