mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
wrappercamerabinsrc: Push newsegments on video capture start
Pushing newsegments to inform muxers about the start time of the video buffer timestamps.
This commit is contained in:
parent
248a1c86e0
commit
88e3d82201
1 changed files with 8 additions and 0 deletions
|
@ -253,9 +253,17 @@ gst_wrapper_camera_bin_src_vidsrc_probe (GstPad * pad, GstBuffer * buffer,
|
|||
if (self->video_rec_status == GST_VIDEO_RECORDING_STATUS_DONE) {
|
||||
/* NOP */
|
||||
} else if (self->video_rec_status == GST_VIDEO_RECORDING_STATUS_STARTING) {
|
||||
GstClockTime ts;
|
||||
|
||||
GST_DEBUG_OBJECT (self, "Starting video recording");
|
||||
self->video_rec_status = GST_VIDEO_RECORDING_STATUS_RUNNING;
|
||||
|
||||
ts = GST_BUFFER_TIMESTAMP (buffer);
|
||||
if (!GST_CLOCK_TIME_IS_VALID (ts))
|
||||
ts = 0;
|
||||
gst_pad_push_event (self->vidsrc, gst_event_new_new_segment (FALSE, 1.0,
|
||||
GST_FORMAT_TIME, ts, -1, 0));
|
||||
|
||||
/* post preview */
|
||||
GST_DEBUG_OBJECT (self, "Posting preview for video");
|
||||
gst_base_camera_src_post_preview (camerasrc, buffer);
|
||||
|
|
Loading…
Reference in a new issue