mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-18 08:56:45 -05:00
Improve upload
Only send a buffer when we have received a NEED_DATA message. Add a signal to pulla buffer from the sink. Restructure the sink to use a queue like the source and only push a buffer when we can. Improve SpaData. Offset and size should be between 0 and maxsize, make sure we clamp correctly when needed. node_process_output completes the processing of the output after receiving HAVE_OUTPUT for async elements. It instructs the node that it now can produce more output.
This commit is contained in:
parent
8ce3f949e2
commit
5b0b9c43d0
18 changed files with 201 additions and 112 deletions
|
|
@ -328,11 +328,6 @@ on_node_event (SpaNode *node, SpaNodeEvent *event, void *user_data)
|
|||
PinosPort *port = this->output_port_map[ho->port_id];
|
||||
PinosLink *link;
|
||||
|
||||
if ((res = spa_node_process_output (node)) < 0) {
|
||||
pinos_log_warn ("node %p: got pull error %d, %d", this, res, po->status);
|
||||
break;
|
||||
}
|
||||
|
||||
spa_list_for_each (link, &port->rt.links, rt.output_link) {
|
||||
size_t offset;
|
||||
|
||||
|
|
@ -356,6 +351,10 @@ on_node_event (SpaNode *node, SpaNodeEvent *event, void *user_data)
|
|||
if ((res = spa_node_port_reuse_buffer (node, ho->port_id, po->buffer_id)) < 0)
|
||||
pinos_log_warn ("node %p: error reuse buffer: %d", node, res);
|
||||
}
|
||||
if ((res = spa_node_process_output (node)) < 0) {
|
||||
pinos_log_warn ("node %p: got pull error %d, %d", this, res, po->status);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPA_NODE_EVENT_TYPE_REUSE_BUFFER:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue