libcamera: control_ids: Generate map of all supported controls

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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2019-10-13 20:37:24 +03:00
parent 5af6a1a012
commit 33ee44dc16
5 changed files with 22 additions and 0 deletions
+9
View File
@@ -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