summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_device.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-10-12 11:35:51 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-15 22:33:27 +0300
commit75e7452fc50b9b45f04500b1e1d2c358b937df9c (patch)
tree3bd31818b0869267dbee64800b19033c876d3a94 /src/libcamera/v4l2_device.cpp
parent35e6319b35729ea1671da8516502dd1ee4212082 (diff)
libcamera: v4l2_controls: Move V4L2ControlId out of V4L2ControlInfo
In order to reconcile the libcamera and V4L2 control info maps, we need to move the V4L2ControlId embedded in V4L2ControlInfo map out of the class. Store the V4L2ControlId instances in the V4L2Device that creates them, and only reference them from V4L2ControlInfo. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> 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>
Diffstat (limited to 'src/libcamera/v4l2_device.cpp')
-rw-r--r--src/libcamera/v4l2_device.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index 54cc214e..144a60b4 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -386,9 +386,10 @@ void V4L2Device::listControls()
continue;
}
+ controlIds_.emplace_back(utils::make_unique<V4L2ControlId>(ctrl));
ctrls.emplace(std::piecewise_construct,
std::forward_as_tuple(ctrl.id),
- std::forward_as_tuple(ctrl));
+ std::forward_as_tuple(*controlIds_.back().get(), ctrl));
}
controls_ = std::move(ctrls);