summaryrefslogtreecommitdiff
path: root/src/gstreamer/gstlibcamera-utils.h
diff options
context:
space:
mode:
authorHou Qi <qi.hou@nxp.com>2025-05-19 16:52:10 +0900
committerKieran Bingham <kieran.bingham@ideasonboard.com>2025-05-19 09:28:19 +0100
commit848a3017b8eee31eb94add447850b2751f38aa62 (patch)
tree2e7fcbb77e79c953af035304ce31735e2e298f6e /src/gstreamer/gstlibcamera-utils.h
parente5442c3150fd18eda0242e0cdbf9360f142b5e13 (diff)
gstreamer: Add GstVideoMeta support
GStreamer video-info calculated stride and offset may differ from those used by the camera. For stride and offset mismatch, this patch adds video meta to buffer if downstream supports VideoMeta through allocation query. Otherwise, create a internal VideoPool using the caps, and copy video frame to this system memory. Signed-off-by: Hou Qi <qi.hou@nxp.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/gstreamer/gstlibcamera-utils.h')
-rw-r--r--src/gstreamer/gstlibcamera-utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gstreamer/gstlibcamera-utils.h b/src/gstreamer/gstlibcamera-utils.h
index 4978987c..5f4e8a0f 100644
--- a/src/gstreamer/gstlibcamera-utils.h
+++ b/src/gstreamer/gstlibcamera-utils.h
@@ -36,6 +36,11 @@ static inline void gst_clear_event(GstEvent **event_ptr)
#if !GST_CHECK_VERSION(1, 17, 1)
gboolean gst_task_resume(GstTask *task);
#endif
+
+#if !GST_CHECK_VERSION(1, 22, 0)
+gint gst_video_format_info_extrapolate_stride(const GstVideoFormatInfo *finfo, gint plane, gint stride);
+#endif
+
std::shared_ptr<libcamera::CameraManager> gst_libcamera_get_camera_manager(int &ret);
/**