summaryrefslogtreecommitdiff
path: root/gst/camerabin2
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2014-12-26 10:17:19 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2014-12-26 23:07:39 -0300
commit6fa077f4652541368346dd2458dec8099fa12c34 (patch)
tree184bc8fbb732962bb6e3eb8236c70fb7077fb6d9 /gst/camerabin2
parent5496fd3e75e65a4e387715d0ba0740790aefa5f6 (diff)
wrappercamerabinsrc: use the drain query instead of flush
The flush might clear any pending captures that are still in queues being processed while the drain query will wait for those to be properly done
Diffstat (limited to 'gst/camerabin2')
-rw-r--r--gst/camerabin2/gstwrappercamerabinsrc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index 24f44f39a..5c08d0eb9 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -833,18 +833,16 @@ start_image_capture (GstWrapperCameraBinSrc * self)
GST_DEBUG_OBJECT (self, "Starting image capture");
- /* FIXME - V4L2 source will not close the device until all buffers have came
- * back. Flushing the pipeline, will ensure it's properly closed, and that
- * setting it back to PLAYING will work. This is more a workaround then a
- * solution to buffer reclaiming. */
+ /* V4L2 source will not close the device until all buffers have came
+ * back. Draining the pipeline, will ensure it's properly closed, and that
+ * setting it back to PLAYING will work. */
pad = gst_element_get_static_pad (self->src_vid_src, "src");
if (self->image_renegotiate) {
peer = gst_pad_get_peer (pad);
gst_object_unref (pad);
- gst_pad_send_event (peer, gst_event_new_flush_start ());
+ gst_pad_query (peer, gst_query_new_drain ());
gst_element_set_state (self->src_vid_src, GST_STATE_READY);
- gst_pad_send_event (peer, gst_event_new_flush_stop (TRUE));
gst_object_unref (peer);
/* clean capsfilter caps so they don't interfere here */