mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
Improve loop callbacks
Pass just one data item to the callbacks. Add properties to port. Add user data to link Handle autolink with multiple ports More work on jack support
This commit is contained in:
parent
cfd9967637
commit
9ad1f911b2
38 changed files with 1773 additions and 271 deletions
|
|
@ -90,7 +90,8 @@ static inline void spa_graph_scheduler_pull(struct spa_graph_scheduler *sched, s
|
|||
pnode = pport->node;
|
||||
debug("node %p peer %p io %d\n", node, pnode, pport->io->status);
|
||||
if (pport->io->status == SPA_RESULT_NEED_BUFFER) {
|
||||
spa_list_insert(ready.prev, &pnode->ready_link);
|
||||
if (pnode->ready_link.next == NULL)
|
||||
spa_list_append(&ready, &pnode->ready_link);
|
||||
}
|
||||
else if (pport->io->status == SPA_RESULT_OK && !(pnode->flags & SPA_GRAPH_NODE_FLAG_ASYNC))
|
||||
node->ready_in++;
|
||||
|
|
@ -111,7 +112,7 @@ static inline void spa_graph_scheduler_pull(struct spa_graph_scheduler *sched, s
|
|||
n->ready_link.next = NULL;
|
||||
}
|
||||
|
||||
debug("node %p %d %d\n", node, node->ready_in, node->required_in);
|
||||
debug("node %p ready_in:%d required_in:%d\n", node, node->ready_in, node->required_in);
|
||||
|
||||
if (node->required_in > 0 && node->ready_in == node->required_in) {
|
||||
node->state = node->callbacks->process_input(node->callbacks_data);
|
||||
|
|
@ -179,7 +180,8 @@ static inline void spa_graph_scheduler_push(struct spa_graph_scheduler *sched, s
|
|||
pnode->ready_in, pnode->required_in);
|
||||
|
||||
if (pnode->required_in > 0 && pnode->ready_in == pnode->required_in)
|
||||
spa_list_insert(ready.prev, &pnode->ready_link);
|
||||
if (pnode->ready_link.next == NULL)
|
||||
spa_list_append(&ready, &pnode->ready_link);
|
||||
}
|
||||
|
||||
spa_graph_scheduler_chain(sched, &ready);
|
||||
|
|
|
|||
|
|
@ -148,19 +148,11 @@ struct spa_loop_control {
|
|||
#define spa_loop_control_leave(l) (l)->leave(l)
|
||||
|
||||
|
||||
typedef void (*spa_source_io_func_t) (struct spa_loop_utils *utils,
|
||||
struct spa_source *source,
|
||||
int fd, enum spa_io mask, void *data);
|
||||
typedef void (*spa_source_idle_func_t) (struct spa_loop_utils *utils,
|
||||
struct spa_source *source, void *data);
|
||||
typedef void (*spa_source_event_func_t) (struct spa_loop_utils *utils,
|
||||
struct spa_source *source,
|
||||
uint64_t count, void *data);
|
||||
typedef void (*spa_source_timer_func_t) (struct spa_loop_utils *utils,
|
||||
struct spa_source *source, void *data);
|
||||
typedef void (*spa_source_signal_func_t) (struct spa_loop_utils *utils,
|
||||
struct spa_source *source,
|
||||
int signal_number, void *data);
|
||||
typedef void (*spa_source_io_func_t) (void *data, int fd, enum spa_io mask);
|
||||
typedef void (*spa_source_idle_func_t) (void *data);
|
||||
typedef void (*spa_source_event_func_t) (void *data, uint64_t count);
|
||||
typedef void (*spa_source_timer_func_t) (void *data, uint64_t expirations);
|
||||
typedef void (*spa_source_signal_func_t) (void *data, int signal_number);
|
||||
|
||||
/**
|
||||
* struct spa_loop_utils:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue