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
@ -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) {
|
if (self->video_rec_status == GST_VIDEO_RECORDING_STATUS_DONE) {
|
||||||
/* NOP */
|
/* NOP */
|
||||||
} else if (self->video_rec_status == GST_VIDEO_RECORDING_STATUS_STARTING) {
|
} else if (self->video_rec_status == GST_VIDEO_RECORDING_STATUS_STARTING) {
|
||||||
|
GstClockTime ts;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Starting video recording");
|
GST_DEBUG_OBJECT (self, "Starting video recording");
|
||||||
self->video_rec_status = GST_VIDEO_RECORDING_STATUS_RUNNING;
|
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 */
|
/* post preview */
|
||||||
GST_DEBUG_OBJECT (self, "Posting preview for video");
|
GST_DEBUG_OBJECT (self, "Posting preview for video");
|
||||||
gst_base_camera_src_post_preview (camerasrc, buffer);
|
gst_base_camera_src_post_preview (camerasrc, buffer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user