[libcamera-devel] [PATCH v2 16/27] gst: libcamerasrc: Push segment event
Nicolas Dufresne
nicolas.dufresne at collabora.com
Thu Feb 27 21:03:56 CET 2020
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 at collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/gstreamer/gstlibcamerasrc.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
index 2c5c34c..4003a89 100644
--- a/src/gstreamer/gstlibcamerasrc.cpp
+++ b/src/gstreamer/gstlibcamerasrc.cpp
@@ -200,6 +200,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));
}
{
--
2.24.1
More information about the libcamera-devel
mailing list