diff options
author | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-10-08 17:29:39 +0200 |
---|---|---|
committer | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-11-13 11:47:06 +0100 |
commit | af0ca816b802166b625fa3bc1ec2499d1a8358ba (patch) | |
tree | 2e8a7d261873e41134c4fbe90170805e779b8029 | |
parent | dcb90f13cf79d909d04dacf2cfbd256a4744347f (diff) |
libcamera: Add debug control space
Add a new 'debug' controls namespace for the upcoming implementation of
debug metadata. While at it, sort the entries alphabetically.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | include/libcamera/control_ids.h.in | 2 | ||||
-rw-r--r-- | include/libcamera/meson.build | 5 | ||||
-rw-r--r-- | src/libcamera/control_ids_debug.yaml | 6 | ||||
-rw-r--r-- | src/libcamera/control_ranges.yaml | 4 |
4 files changed, 14 insertions, 3 deletions
diff --git a/include/libcamera/control_ids.h.in b/include/libcamera/control_ids.h.in index 858ef872..5d0594c6 100644 --- a/include/libcamera/control_ids.h.in +++ b/include/libcamera/control_ids.h.in @@ -30,11 +30,13 @@ namespace {{vendor}} { #define LIBCAMERA_HAS_{{vendor|upper}}_VENDOR_{{mode|upper}} {%- endif %} +{% if ctrls %} enum { {%- for ctrl in ctrls %} {{ctrl.name|snake_case|upper}} = {{ctrl.id}}, {%- endfor %} }; +{% endif %} {% for ctrl in ctrls -%} {% if ctrl.is_enum -%} diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index a969a95d..fd69a517 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -34,8 +34,9 @@ libcamera_headers_install_dir = get_option('includedir') / libcamera_include_dir controls_map = { 'controls': { - 'draft': 'control_ids_draft.yaml', 'core': 'control_ids_core.yaml', + 'debug': 'control_ids_debug.yaml', + 'draft': 'control_ids_draft.yaml', 'rpi/vc4': 'control_ids_rpi.yaml', }, @@ -55,7 +56,7 @@ foreach mode, entry : controls_map files_list = [] input_files = [] foreach vendor, header : entry - if vendor != 'core' and vendor != 'draft' + if vendor not in ['core', 'debug', 'draft'] if vendor not in pipelines continue endif diff --git a/src/libcamera/control_ids_debug.yaml b/src/libcamera/control_ids_debug.yaml new file mode 100644 index 00000000..79753271 --- /dev/null +++ b/src/libcamera/control_ids_debug.yaml @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +%YAML 1.1 +--- +vendor: debug +controls: [] diff --git a/src/libcamera/control_ranges.yaml b/src/libcamera/control_ranges.yaml index d42447d0..6752eb98 100644 --- a/src/libcamera/control_ranges.yaml +++ b/src/libcamera/control_ranges.yaml @@ -13,6 +13,8 @@ ranges: draft: 10000 # Raspberry Pi vendor controls rpi: 20000 - # Next range starts at 30000 + # Controls for debug metadata + debug: 30000 + # Next range starts at 40000 ... |