From e18a007b9d0b69149f81412b6313c682c874d7ea Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 9 Nov 2023 12:30:18 +0000 Subject: libcamera: controls: Use vendor tags for draft controls and properties Label draft controls and properties through the "draft" vendor tag and deprecate the existing "draft: true" mechanism. This uses the new vendor tags mechanism to place draft controls in the same libcamera::controls::draft namespace and provide a defined control id range for these controls. This requires moving all draft controls from control_ids.yaml to control_ids_draft.yaml. One breaking change in this commit is that draft control ids also move to the libcamera::controls::draft namespace from the existing libcamera::controls namespace. This is desirable to avoid API breakages when adding new libcamera controls. So, for example, the use of controls::NOISE_REDUCTION_MODE will need to be replaced with controls::draft::NOISE_REDUCTION_MODE. Signed-off-by: Naushir Patuck Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- include/libcamera/control_ids.h.in | 6 ------ include/libcamera/meson.build | 2 ++ include/libcamera/property_ids.h.in | 6 ------ 3 files changed, 2 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/libcamera/control_ids.h.in b/include/libcamera/control_ids.h.in index c97b09a8..d53b1cf7 100644 --- a/include/libcamera/control_ids.h.in +++ b/include/libcamera/control_ids.h.in @@ -26,12 +26,6 @@ ${controls} extern const ControlIdMap controls; -namespace draft { - -${draft_controls} - -} /* namespace draft */ - ${vendor_controls} } /* namespace controls */ diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index a2bb5d16..bab858a3 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -34,10 +34,12 @@ libcamera_headers_install_dir = get_option('includedir') / libcamera_include_dir controls_map = { 'controls': { + 'draft': 'control_ids_draft.yaml', 'core': 'control_ids_core.yaml', }, 'properties': { + 'draft': 'property_ids_draft.yaml', 'core': 'property_ids_core.yaml', } } diff --git a/include/libcamera/property_ids.h.in b/include/libcamera/property_ids.h.in index 47c5d6bf..43372c71 100644 --- a/include/libcamera/property_ids.h.in +++ b/include/libcamera/property_ids.h.in @@ -23,12 +23,6 @@ ${ids} ${controls} -namespace draft { - -${draft_controls} - -} /* namespace draft */ - extern const ControlIdMap properties; ${vendor_controls} -- cgit v1.2.1