v4l2: fix flushing start and stop
Move the flushing calls to the right place in the bufferpool. Fix the min and max buffer sizes.
This commit is contained in:
parent
0a88ac4c92
commit
e6a8718f0c
@ -240,8 +240,8 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config)
|
|||||||
GST_DEBUG_OBJECT (pool, "config %" GST_PTR_FORMAT, config);
|
GST_DEBUG_OBJECT (pool, "config %" GST_PTR_FORMAT, config);
|
||||||
|
|
||||||
pool->size = size;
|
pool->size = size;
|
||||||
pool->min_buffers = min_buffers;
|
pool->max_buffers = MAX (min_buffers, max_buffers);
|
||||||
pool->max_buffers = max_buffers;
|
pool->min_buffers = MIN (pool->max_buffers, min_buffers);
|
||||||
pool->prefix = prefix;
|
pool->prefix = prefix;
|
||||||
pool->align = align;
|
pool->align = align;
|
||||||
|
|
||||||
@ -360,6 +360,8 @@ gst_v4l2_buffer_pool_start (GstBufferPool * bpool)
|
|||||||
if (!start_streaming (pool))
|
if (!start_streaming (pool))
|
||||||
goto start_failed;
|
goto start_failed;
|
||||||
|
|
||||||
|
gst_poll_set_flushing (obj->poll, FALSE);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
@ -398,6 +400,8 @@ gst_v4l2_buffer_pool_stop (GstBufferPool * bpool)
|
|||||||
|
|
||||||
GST_DEBUG_OBJECT (pool, "stopping pool");
|
GST_DEBUG_OBJECT (pool, "stopping pool");
|
||||||
|
|
||||||
|
gst_poll_set_flushing (obj->poll, TRUE);
|
||||||
|
|
||||||
if (pool->streaming) {
|
if (pool->streaming) {
|
||||||
switch (obj->mode) {
|
switch (obj->mode) {
|
||||||
case GST_V4L2_IO_RW:
|
case GST_V4L2_IO_RW:
|
||||||
|
@ -2418,8 +2418,6 @@ gst_v4l2_object_stop (GstV4l2Object * v4l2object)
|
|||||||
if (!GST_V4L2_IS_ACTIVE (v4l2object))
|
if (!GST_V4L2_IS_ACTIVE (v4l2object))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
gst_poll_set_flushing (v4l2object->poll, TRUE);
|
|
||||||
|
|
||||||
if (v4l2object->pool) {
|
if (v4l2object->pool) {
|
||||||
GST_DEBUG_OBJECT (v4l2object->element, "deactivating pool");
|
GST_DEBUG_OBJECT (v4l2object->element, "deactivating pool");
|
||||||
gst_buffer_pool_set_active (v4l2object->pool, FALSE);
|
gst_buffer_pool_set_active (v4l2object->pool, FALSE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user