summaryrefslogtreecommitdiff
path: root/src/gstreamer/gstlibcamerasrc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gstreamer/gstlibcamerasrc.h')
-rw-r--r--src/gstreamer/gstlibcamerasrc.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/gstreamer/gstlibcamerasrc.h b/src/gstreamer/gstlibcamerasrc.h
index fdea2f10..0a88ba02 100644
--- a/src/gstreamer/gstlibcamerasrc.h
+++ b/src/gstreamer/gstlibcamerasrc.h
@@ -8,6 +8,8 @@
#pragma once
+#include <libcamera/control_ids.h>
+
#include <gst/gst.h>
G_BEGIN_DECLS
@@ -17,3 +19,32 @@ G_DECLARE_FINAL_TYPE(GstLibcameraSrc, gst_libcamera_src,
GST_LIBCAMERA, SRC, GstElement)
G_END_DECLS
+
+inline GType
+gst_libcamera_auto_focus_get_type()
+{
+ static GType type = 0;
+ static const GEnumValue values[] = {
+ {
+ static_cast<gint>(libcamera::controls::AfModeManual),
+ "AfModeManual",
+ "manual-focus",
+ },
+ {
+ static_cast<gint>(libcamera::controls::AfModeAuto),
+ "AfModeAuto",
+ "automatic-auto-focus",
+ },
+ {
+ static_cast<gint>(libcamera::controls::AfModeContinuous),
+ "AfModeContinuous",
+ "continuous-auto-focus",
+ },
+ { 0, NULL, NULL }
+ };
+
+ if (!type)
+ type = g_enum_register_static("GstLibcameraAutoFocus", values);
+
+ return type;
+}