mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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).
This commit is contained in:
parent
ffb7a78798
commit
bc002d579f
1 changed files with 1 additions and 2 deletions
|
@ -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. */
|
||||
|
|
Loading…
Reference in a new issue