mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
graph: new scheduling model
Make explicit links between elements that are used to activate the next element in the graph. Make subgraphs a special regular node. Make a link from the subgraph children to the parent so that the subgraph completes when all the children completed. Implement a single process function in plugins Remove many messages in the client node
This commit is contained in:
parent
9b0a880afb
commit
33a322b96e
36 changed files with 401 additions and 750 deletions
|
|
@ -828,6 +828,8 @@ static int impl_node_process(struct spa_node *node)
|
|||
io = port->io;
|
||||
spa_return_val_if_fail(io != NULL, -EIO);
|
||||
|
||||
spa_log_trace(port->log, NAME " %p; status %d", node, io->status);
|
||||
|
||||
if (io->status == SPA_STATUS_HAVE_BUFFER)
|
||||
return SPA_STATUS_HAVE_BUFFER;
|
||||
|
||||
|
|
@ -862,6 +864,8 @@ static int impl_node_process(struct spa_node *node)
|
|||
b = spa_list_first(&port->queue, struct buffer, link);
|
||||
spa_list_remove(&b->link);
|
||||
|
||||
spa_log_trace(port->log, NAME " %p: dequeue buffer %d", node, b->outbuf->id);
|
||||
|
||||
io->buffer_id = b->outbuf->id;
|
||||
io->status = SPA_STATUS_HAVE_BUFFER;
|
||||
|
||||
|
|
|
|||
|
|
@ -1181,7 +1181,7 @@ static int mmap_read(struct impl *this)
|
|||
spa_list_append(&port->queue, &b->link);
|
||||
|
||||
spa_log_trace(port->log, "v4l2 %p: have output %d", this, buf.index);
|
||||
this->callbacks->have_output(this->callbacks_data);
|
||||
this->callbacks->process(this->callbacks_data, SPA_STATUS_HAVE_BUFFER);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue