From 33ee44dc16dc7e6fd15926d76a10545601a20613 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 6 Oct 2019 09:43:07 +0300 Subject: libcamera: control_ids: Generate map of all supported controls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to deserialise a ControlList, we will need to lookup ControlId instances based on their numerical ID. Generate a global map from the controls definitions to support such a lookup. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Tested-by: Niklas Söderlund Reviewed-by: Niklas Söderlund --- src/libcamera/controls.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libcamera/controls.cpp') diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index f3260edc..70c1af48 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -355,6 +355,15 @@ std::string ControlRange::toString() const return ss.str(); } +/** + * \typedef ControlIdMap + * \brief A map of numerical control ID to ControlId + * + * The map is used by ControlList instances to access controls by numerical + * IDs. A global map of all libcamera controls is provided by + * controls::controls. + */ + /** * \typedef ControlInfoMap * \brief A map of ControlId to ControlRange -- cgit v1.2.1