mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-19 18:35:07 +03:00
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>
This commit is contained in:
parent
2575b49160
commit
d343326d28
1 changed files with 5 additions and 0 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue