summaryrefslogtreecommitdiff
path: root/gst/camerabin2
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.com>2012-08-26 16:42:04 -0300
committerThiago Santos <thiago.sousa.santos@collabora.com>2012-08-29 15:45:05 -0300
commit9fd555c3d0d77ae00b29b34831b5dd08bf68fdbf (patch)
tree182d9e722904450a2a259742531472a89a2f5f68 /gst/camerabin2
parent4f2bcc324389fa32216baece1786389914f3a2f4 (diff)
downloadgstreamer-plugins-bad-9fd555c3d0d77ae00b29b34831b5dd08bf68fdbf.tar.gz
wrappercamerabinsrc: rework video recording eos push
Push EOS outside of wrappercamerabinsrc so that none of the internal elements gets its pads into eos state, preventing any further data from passing
Diffstat (limited to 'gst/camerabin2')
-rw-r--r--gst/camerabin2/gstwrappercamerabinsrc.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index c263296b7..3b7a1d70c 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -280,9 +280,20 @@ gst_wrapper_camera_bin_src_vidsrc_probe (GstPad * pad, GstPadProbeInfo * info,
ret = GST_PAD_PROBE_OK;
} else if (self->video_rec_status == GST_VIDEO_RECORDING_STATUS_FINISHING) {
+ GstPad *peer;
+
/* send eos */
GST_DEBUG_OBJECT (self, "Finishing video recording, pushing eos");
- gst_pad_push_event (pad, gst_event_new_eos ());
+
+ peer = gst_pad_get_peer (self->vidsrc);
+
+ if (peer) {
+ /* send to the peer as we don't want our pads with eos flag */
+ gst_pad_send_event (peer, gst_event_new_eos ());
+ gst_object_unref (peer);
+ } else {
+ GST_WARNING_OBJECT (camerasrc, "No peer pad for vidsrc");
+ }
self->video_rec_status = GST_VIDEO_RECORDING_STATUS_DONE;
gst_base_camera_src_finish_capture (camerasrc);
} else {