diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2022-05-09 13:10:21 +0300 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-05-10 13:53:43 +0200 |
commit | 6e92cb9dc49e0bdd7b909f3da72c6032bcaa2c42 (patch) | |
tree | 99173565dd5e4bcdef7f1a6d7182671b96a2ce15 /src/py/libcamera/pyenums_generated.cpp.in | |
parent | 8aa02271fd716ed046970a0b1f89176963303f50 (diff) |
py: Generate control enums from yaml
Generate enums for controls from control_ids.yaml. The generator script
has some heuristics to generate nicer enum names. E.g. instead of having
"LensShadingMapMode.LensShadingMapModeOff" we get
"LensShadingMapMode.Off". This heuristics may need to be updated when
the yaml file is changed or new controls are added.
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>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/py/libcamera/pyenums_generated.cpp.in')
-rw-r--r-- | src/py/libcamera/pyenums_generated.cpp.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/py/libcamera/pyenums_generated.cpp.in b/src/py/libcamera/pyenums_generated.cpp.in new file mode 100644 index 00000000..6aaf4795 --- /dev/null +++ b/src/py/libcamera/pyenums_generated.cpp.in @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> + * + * Python bindings - Auto-generated enums + * + * This file is auto-generated. Do not edit. + */ + +#include <libcamera/libcamera.h> + +#include <pybind11/smart_holder.h> + +namespace py = pybind11; + +using namespace libcamera; + +void init_pyenums_generated(py::module& m) +{ +${enums} +} |