summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/control_ids.h.in (renamed from include/libcamera/control_ids.h)16
-rwxr-xr-xinclude/libcamera/gen-header.sh2
-rw-r--r--include/libcamera/meson.build18
3 files changed, 19 insertions, 17 deletions
diff --git a/include/libcamera/control_ids.h b/include/libcamera/control_ids.h.in
index 54235f1a..1d0bc791 100644
--- a/include/libcamera/control_ids.h
+++ b/include/libcamera/control_ids.h.in
@@ -3,6 +3,8 @@
* Copyright (C) 2019, Google Inc.
*
* control_ids.h : Control ID list
+ *
+ * This file is auto-generated. Do not edit.
*/
#ifndef __LIBCAMERA_CONTROL_IDS_H__
@@ -17,20 +19,10 @@ namespace libcamera {
namespace controls {
enum {
- AWB_ENABLE = 1,
- BRIGHTNESS = 2,
- CONTRAST = 3,
- SATURATION = 4,
- MANUAL_EXPOSURE = 5,
- MANUAL_GAIN = 6,
+${ids}
};
-extern const Control<bool> AwbEnable;
-extern const Control<int32_t> Brightness;
-extern const Control<int32_t> Contrast;
-extern const Control<int32_t> Saturation;
-extern const Control<int32_t> ManualExposure;
-extern const Control<int32_t> ManualGain;
+${controls}
} /* namespace controls */
diff --git a/include/libcamera/gen-header.sh b/include/libcamera/gen-header.sh
index a69fe8e9..7f7816c9 100755
--- a/include/libcamera/gen-header.sh
+++ b/include/libcamera/gen-header.sh
@@ -19,7 +19,7 @@ EOF
headers=$(for header in "$src_dir"/*.h ; do
header=$(basename "$header")
echo "$header"
-done ; echo "version.h" | sort)
+done ; echo "control_ids.h" ; echo "version.h" | sort)
for header in $headers ; do
echo "#include <libcamera/$header>" >> "$dst_file"
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index 868f1a6b..4ffbdab3 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -3,7 +3,6 @@ libcamera_api = files([
'buffer.h',
'camera.h',
'camera_manager.h',
- 'control_ids.h',
'controls.h',
'event_dispatcher.h',
'event_notifier.h',
@@ -18,6 +17,20 @@ libcamera_api = files([
include_dir = join_paths(libcamera_include_dir, 'libcamera')
+install_headers(libcamera_api,
+ subdir : include_dir)
+
+gen_controls = files('../../src/libcamera/gen-controls.py')
+
+control_ids_h = custom_target('control_ids_h',
+ input : files('../../src/libcamera/control_ids.yaml', 'control_ids.h.in'),
+ output : 'control_ids.h',
+ depend_files : gen_controls,
+ command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@'],
+ install_dir : join_paths('include', include_dir))
+
+libcamera_api += control_ids_h
+
gen_header = files('gen-header.sh')
libcamera_h = custom_target('gen-header',
@@ -37,6 +50,3 @@ configure_file(input : 'version.h.in',
output : 'version.h',
configuration : libcamera_version_config,
install_dir : join_paths('include', include_dir))
-
-install_headers(libcamera_api,
- subdir : include_dir)