summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2020-01-22 15:37:34 -0500
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-07 01:57:45 +0200
commitd343326d28dd03877dd3d602c5494b5887ac34e5 (patch)
treebe1753f43863ad2ca949790f8c25f6ee59dada48 /src
parent2575b4916031d83bd777001c4b160e3a5c9008f9 (diff)
gst: libcamerasrc: Push segment event
Now that we have stream-start and caps, we can now push a segment event to announce what time will our buffer correlate to. For live sources this is just an open segment in time format. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/gstreamer/gstlibcamerasrc.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
index 95af1414..540a0945 100644
--- a/src/gstreamer/gstlibcamerasrc.cpp
+++ b/src/gstreamer/gstlibcamerasrc.cpp
@@ -205,6 +205,11 @@ gst_libcamera_src_task_enter(GstTask *task, GThread *thread, gpointer user_data)
flow_ret = GST_FLOW_NOT_NEGOTIATED;
break;
}
+
+ /* Send an open segment event with time format. */
+ GstSegment segment;
+ gst_segment_init(&segment, GST_FORMAT_TIME);
+ gst_pad_push_event(srcpad, gst_event_new_segment(&segment));
}
ret = state->cam_->configure(state->config_.get());