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:
Wim Taymans 2016-12-20 16:51:57 +01:00
parent 8ce3f949e2
commit 5b0b9c43d0
18 changed files with 201 additions and 112 deletions

View file

@ -598,12 +598,12 @@ add_port_data (SpaAudioMixer *this, SpaBuffer *out, SpaAudioMixerPort *port)
while (true) {
if (op == NULL) {
op = (uint8_t*)odatas[oi].data + odatas[oi].offset;
os = odatas[oi].size;
op = (uint8_t*)odatas[oi].data + odatas[oi].chunk->offset;
os = odatas[oi].chunk->size;
}
if (ip == NULL) {
ip = (uint8_t*)idatas[port->buffer_index].data + idatas[port->buffer_index].offset;
is = idatas[port->buffer_index].size;
ip = (uint8_t*)idatas[port->buffer_index].data + idatas[port->buffer_index].chunk->offset;
is = idatas[port->buffer_index].chunk->size;
ip += port->buffer_offset;
is -= port->buffer_offset;
}