Commit bc002d57 authored by Nicolas Dufresne's avatar Nicolas Dufresne

v4l2bufferpool: Don't queue all the buffers before dequeueing first

For output device, we where queuing all the buffers, and then we would
dequeue one. This means we only have 1 buffer for the pipeline, no matter
the size of the queue. Instead, start dequeued when min_latency is reached.
Eventually, this the min_latency should also be affected by control
MIN_BUFFERS_FOR_OUTPUT (use by encoders).
parent ffb7a787
......@@ -1633,8 +1633,7 @@ gst_v4l2_buffer_pool_process (GstV4l2BufferPool * pool, GstBuffer ** buf)
if (g_atomic_int_get (&pool->num_queued) ==
gst_v4l2_allocator_num_allocated (pool->vallocator)) {
if (g_atomic_int_get (&pool->num_queued) >= pool->min_latency) {
GstBuffer *out;
/* all buffers are queued, try to dequeue one and release it back
* into the pool so that _acquire can get to it again. */
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment