libcamera: controls: Index ControlList by unsigned int

In preparation for serialization, index the ControlList by unsigned int.
This will allow deserializing a ControlList without requiring external
information.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Laurent Pinchart
2019-10-25 23:48:45 +03:00
parent c27b7c103a
commit e89c2b2295
8 changed files with 60 additions and 64 deletions
+2 -2
View File
@@ -231,7 +231,7 @@ int PipelineHandlerUVC::processControls(UVCCameraData *data, Request *request)
ControlList controls(data->video_->controls());
for (auto it : request->controls()) {
const ControlId &id = *it.first;
unsigned int id = it.first;
ControlValue &value = it.second;
if (id == controls::Brightness) {
@@ -250,7 +250,7 @@ int PipelineHandlerUVC::processControls(UVCCameraData *data, Request *request)
for (const auto &ctrl : controls)
LOG(UVC, Debug)
<< "Setting control " << ctrl.first->name()
<< "Setting control " << utils::hex(ctrl.first)
<< " to " << ctrl.second.toString();
int ret = data->video_->setControls(&controls);