summaryrefslogtreecommitdiff
path: root/src/py/libcamera/py_helpers.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2022-07-01 11:45:07 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-08-18 22:00:46 +0300
commit4bd2d5191c0ad5ae607d82dc6dfaadfe124a0c38 (patch)
treedf6424b68c4c7c68bc17f64b7ca0c230c229b10c /src/py/libcamera/py_helpers.h
parenta7f73dd096e02320b44b8819e44189ffbaf406a5 (diff)
py: Move ControlValue helpers to py_helpers.cpp
Clean up the py_main.cpp a bit by moving the ControlValue helpers to a separate file. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/py/libcamera/py_helpers.h')
-rw-r--r--src/py/libcamera/py_helpers.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/py/libcamera/py_helpers.h b/src/py/libcamera/py_helpers.h
new file mode 100644
index 00000000..cd31e2cc
--- /dev/null
+++ b/src/py/libcamera/py_helpers.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
+ */
+
+#pragma once
+
+#include <libcamera/libcamera.h>
+
+#include <pybind11/smart_holder.h>
+
+pybind11::object controlValueToPy(const libcamera::ControlValue &cv);
+libcamera::ControlValue pyToControlValue(const pybind11::object &ob, libcamera::ControlType type);