diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2022-05-27 17:44:29 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-05-27 22:03:34 +0300 |
commit | 3c82ae3821798794873be939bb46c507d4ebde7c (patch) | |
tree | 13ec729394b33b59a544bd3afee00ff9b674ab15 /src/py/libcamera/py_controls_generated.cpp.in | |
parent | 6eb1143e27d284200a672f957c8e5efbf87aafcc (diff) |
py: Re-implement controls geneneration
The Python bindings controls generation was not very good. It only
covered the enums and they were in the main namespace.
This adds the controls somewhat similarly to the C++ side. We will have
e.g.:
libcamera.controls.Brightness
libcamera.controls.AeMeteringModeEnum.CentreWeighted
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@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_controls_generated.cpp.in')
-rw-r--r-- | src/py/libcamera/py_controls_generated.cpp.in | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/py/libcamera/py_controls_generated.cpp.in b/src/py/libcamera/py_controls_generated.cpp.in new file mode 100644 index 00000000..cb8442ba --- /dev/null +++ b/src/py/libcamera/py_controls_generated.cpp.in @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> + * + * Python bindings - Auto-generated controls + * + * This file is auto-generated. Do not edit. + */ + +#include <libcamera/control_ids.h> + +#include <pybind11/smart_holder.h> + +namespace py = pybind11; + +class PyControls +{ +}; + +class PyDraftControls +{ +}; + +void init_py_controls_generated(py::module& m) +{ + auto controls = py::class_<PyControls>(m, "controls"); + auto draft = py::class_<PyDraftControls>(controls, "draft"); + +${controls} +} |