Improve process_output

process_output is now to finish processing of the output in async nodes,
which means we need to fill the io area before sending the HAVE_OUTPUT
event. This simplifies some things and improves performance because we
don't need to deal with queues and additional checks.
This commit is contained in:
Wim Taymans 2016-12-20 18:10:50 +01:00
parent 5b0b9c43d0
commit f5dbdbc0df
10 changed files with 45 additions and 156 deletions

View file

@ -842,6 +842,7 @@ mmap_read (SpaV4l2Source *this)
V4l2Buffer *b;
SpaData *d;
int64_t pts;
SpaPortOutput *output;
CLEAR(buf);
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
@ -880,8 +881,11 @@ mmap_read (SpaV4l2Source *this)
d[0].chunk->size = buf.bytesused;
d[0].chunk->stride = state->fmt.fmt.pix.bytesperline;
spa_list_insert (state->ready.prev, &b->list);
if ((output = state->io)) {
b->outstanding = true;
output->buffer_id = b->outbuf->id;
output->status = SPA_RESULT_OK;
}
return SPA_RESULT_OK;
}