mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -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 {
|
struct spa_graph_state {
|
||||||
int status; /**< current status */
|
int status; /**< current status */
|
||||||
uint32_t required; /**< required number of signals */
|
int32_t required; /**< required number of signals */
|
||||||
uint32_t pending; /**< number of pending signals */
|
int32_t pending; /**< number of pending signals */
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void spa_graph_state_reset(struct spa_graph_state *state)
|
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;
|
uint32_t owner[2], reposition_owner;
|
||||||
uint64_t min_timeout = UINT64_MAX;
|
uint64_t min_timeout = UINT64_MAX;
|
||||||
|
|
||||||
if (a->state[0].pending != 0) {
|
if (a->state[0].pending > 0) {
|
||||||
pw_log_warn(NAME" %p: graph not finished", node);
|
pw_log_warn(NAME" %p: graph not finished: pending %d", node, a->state[0].pending);
|
||||||
pw_context_driver_emit_incomplete(node->context, node);
|
pw_context_driver_emit_incomplete(node->context, node);
|
||||||
dump_states(node);
|
dump_states(node);
|
||||||
node->rt.target.signal(node->rt.target.data);
|
node->rt.target.signal(node->rt.target.data);
|
||||||
|
|
|
||||||
|
|
@ -356,23 +356,23 @@ struct pw_impl_device {
|
||||||
#define pw_impl_module_emit_registered(m) pw_impl_module_emit(m, registered, 0)
|
#define pw_impl_module_emit_registered(m) pw_impl_module_emit(m, registered, 0)
|
||||||
|
|
||||||
struct pw_impl_module {
|
struct pw_impl_module {
|
||||||
struct pw_context *context; /**< the context object */
|
struct pw_context *context; /**< the context object */
|
||||||
struct spa_list link; /**< link in the context module_list */
|
struct spa_list link; /**< link in the context module_list */
|
||||||
struct pw_global *global; /**< global object for this module */
|
struct pw_global *global; /**< global object for this module */
|
||||||
struct spa_hook global_listener;
|
struct spa_hook global_listener;
|
||||||
|
|
||||||
struct pw_properties *properties; /**< properties of the module */
|
struct pw_properties *properties; /**< properties of the module */
|
||||||
struct pw_module_info info; /**< introspectable module info */
|
struct pw_module_info info; /**< introspectable module info */
|
||||||
|
|
||||||
struct spa_hook_list listener_list;
|
struct spa_hook_list listener_list;
|
||||||
|
|
||||||
void *user_data; /**< module user_data */
|
void *user_data; /**< module user_data */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pw_node_activation_state {
|
struct pw_node_activation_state {
|
||||||
int status; /**< current status */
|
int status; /**< current status */
|
||||||
uint32_t required; /**< required number of signals */
|
int32_t required; /**< required number of signals */
|
||||||
uint32_t pending; /**< number of pending signals */
|
int32_t pending; /**< number of pending signals */
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void pw_node_activation_state_reset(struct pw_node_activation_state *state)
|
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