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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user