summaryrefslogtreecommitdiff
path: root/sys/v4l2/gstv4l2videodec.c
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2014-05-14 17:18:35 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2014-05-15 12:21:44 -0400
commita4b5811d22ba401fbcfc4d264034a9ca1d9aca67 (patch)
treedcad0e2289e9f0be523e539f7e21935ed535c795 /sys/v4l2/gstv4l2videodec.c
parentc1792de95e9a6b28891a53cd953941d30bebf09d (diff)
v4l2: Split flush in start/stop_streaming
This allow calling start streaming later for capture device. Currently it breaks in dmabuf-import because downstream is holding a buffer that will only be released after stream-start. https://bugzilla.gnome.org/show_bug.cgi?id=730207
Diffstat (limited to 'sys/v4l2/gstv4l2videodec.c')
-rw-r--r--sys/v4l2/gstv4l2videodec.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/v4l2/gstv4l2videodec.c b/sys/v4l2/gstv4l2videodec.c
index 2b3aa9d83..71481d22a 100644
--- a/sys/v4l2/gstv4l2videodec.c
+++ b/sys/v4l2/gstv4l2videodec.c
@@ -277,13 +277,12 @@ gst_v4l2_video_dec_flush (GstVideoDecoder * decoder)
self->output_flow = GST_FLOW_OK;
if (self->v4l2output->pool)
- gst_v4l2_buffer_pool_flush (GST_V4L2_BUFFER_POOL (self->v4l2output->pool));
+ gst_v4l2_buffer_pool_stop_streaming (GST_V4L2_BUFFER_POOL
+ (self->v4l2output->pool));
if (self->v4l2capture->pool)
- gst_v4l2_buffer_pool_flush (GST_V4L2_BUFFER_POOL (self->v4l2capture->pool));
-
- /* Output will remain flushing until new frame comes in */
- gst_v4l2_object_unlock_stop (self->v4l2capture);
+ gst_v4l2_buffer_pool_stop_streaming (GST_V4L2_BUFFER_POOL
+ (self->v4l2capture->pool));
return TRUE;
}
@@ -525,7 +524,10 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
GST_DEBUG_OBJECT (self, "Starting decoding thread");
/* Enable processing input */
+ gst_v4l2_buffer_pool_start_streaming (GST_V4L2_BUFFER_POOL
+ (self->v4l2capture->pool));
gst_v4l2_object_unlock_stop (self->v4l2output);
+ gst_v4l2_object_unlock_stop (self->v4l2capture);
/* Start the processing task, when it quits, the task will disable input
* processing to unlock input if draining, or prevent potential block */