diff options
author | Dave Robillard <dave@drobilla.net> | 2009-07-03 20:01:36 -0400 |
---|---|---|
committer | Dave Robillard <dave@drobilla.net> | 2009-07-03 20:01:36 -0400 |
commit | e289c875a5e0ee56dd8289e78b63f36f709b6534 (patch) | |
tree | 9bd2b450261bbc0fa522bf27d9a89d017308687e /gst/camerabin/camerabinvideo.c | |
parent | ed06ed3b658b49b1313df38909bcb2f907be83a7 (diff) | |
parent | caba48f261421d397900471b19350da2e5a4a4e5 (diff) | |
download | gst-plugins-bad-e289c875a5e0ee56dd8289e78b63f36f709b6534.tar.gz gst-plugins-bad-e289c875a5e0ee56dd8289e78b63f36f709b6534.tar.bz2 gst-plugins-bad-e289c875a5e0ee56dd8289e78b63f36f709b6534.zip |
Merge branch 'fdo' into lv2
Diffstat (limited to 'gst/camerabin/camerabinvideo.c')
-rw-r--r-- | gst/camerabin/camerabinvideo.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/camerabin/camerabinvideo.c b/gst/camerabin/camerabinvideo.c index 2569772a..4bbc5057 100644 --- a/gst/camerabin/camerabinvideo.c +++ b/gst/camerabin/camerabinvideo.c @@ -398,6 +398,7 @@ camerabin_video_pad_tee_src0_have_buffer (GstPad * pad, GstBuffer * buffer, GstEvent *event; GstObject *tee; GstPad *sinkpad; + vid->adjust_ts_video = GST_BUFFER_TIMESTAMP (buffer) - vid->last_ts_video; vid->calculate_adjust_ts_video = FALSE; event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME, @@ -417,7 +418,6 @@ camerabin_video_pad_tee_src0_have_buffer (GstPad * pad, GstBuffer * buffer, if (GST_BUFFER_DURATION_IS_VALID (buffer)) vid->last_ts_video += GST_BUFFER_DURATION (buffer); - GST_LOG ("buffer out with size %d ts %" GST_TIME_FORMAT, GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer))); return TRUE; @@ -442,6 +442,7 @@ camerabin_video_pad_aud_src_have_buffer (GstPad * pad, GstBuffer * buffer, if (vid->calculate_adjust_ts_aud) { GstEvent *event; GstPad *peerpad = NULL; + vid->adjust_ts_aud = GST_BUFFER_TIMESTAMP (buffer) - vid->last_ts_aud; vid->calculate_adjust_ts_aud = FALSE; event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME, @@ -459,6 +460,7 @@ camerabin_video_pad_aud_src_have_buffer (GstPad * pad, GstBuffer * buffer, vid->last_ts_aud = GST_BUFFER_TIMESTAMP (buffer); if (GST_BUFFER_DURATION_IS_VALID (buffer)) vid->last_ts_aud += GST_BUFFER_DURATION (buffer); + GST_LOG ("buffer out with size %d ts %" GST_TIME_FORMAT, GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer))); return TRUE; @@ -549,6 +551,7 @@ gst_camerabin_video_create_elements (GstCameraBinVideo * vid) vid_sinkpad = gst_element_get_static_pad (vid->tee, "sink"); } gst_ghost_pad_set_target (GST_GHOST_PAD (vid->sinkpad), vid_sinkpad); + gst_object_unref (vid_sinkpad); /* Add queue element for video */ @@ -668,6 +671,7 @@ gst_camerabin_video_create_elements (GstCameraBinVideo * vid) /* Never let video bin eos events reach view finder */ gst_pad_add_event_probe (vid_srcpad, G_CALLBACK (gst_camerabin_drop_eos_probe), vid); + gst_object_unref (vid_srcpad); pad = gst_element_get_static_pad (vid->aud_src, "src"); gst_pad_add_buffer_probe (pad, @@ -702,10 +706,12 @@ gst_camerabin_video_destroy_elements (GstCameraBinVideo * vid) /* Release tee request pads */ if (vid->tee_video_srcpad) { gst_element_release_request_pad (vid->tee, vid->tee_video_srcpad); + gst_object_unref (vid->tee_video_srcpad); vid->tee_video_srcpad = NULL; } if (vid->tee_vf_srcpad) { gst_element_release_request_pad (vid->tee, vid->tee_vf_srcpad); + gst_object_unref (vid->tee_vf_srcpad); vid->tee_vf_srcpad = NULL; } |