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>
This commit is contained in:
committed by
Laurent Pinchart
parent
35e6319b35
commit
75e7452fc5
@@ -122,10 +122,12 @@ V4L2ControlId::V4L2ControlId(const struct v4l2_query_ext_ctrl &ctrl)
|
||||
|
||||
/**
|
||||
* \brief Construct a V4L2ControlInfo from a struct v4l2_query_ext_ctrl
|
||||
* \param[in] id The V4L2 control ID
|
||||
* \param[in] ctrl The struct v4l2_query_ext_ctrl as returned by the kernel
|
||||
*/
|
||||
V4L2ControlInfo::V4L2ControlInfo(const struct v4l2_query_ext_ctrl &ctrl)
|
||||
: id_(ctrl)
|
||||
V4L2ControlInfo::V4L2ControlInfo(const V4L2ControlId &id,
|
||||
const struct v4l2_query_ext_ctrl &ctrl)
|
||||
: id_(&id)
|
||||
{
|
||||
if (ctrl.type == V4L2_CTRL_TYPE_INTEGER64)
|
||||
range_ = ControlRange(static_cast<int64_t>(ctrl.minimum),
|
||||
|
||||
Reference in New Issue
Block a user