libcamera: v4l2_controls: Use the ControlValue class for data storage

Use the ControlValue class to replace the manually crafted data storage
in V4L2Control. This will help sharing code when more data types will be
supported.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2019-09-28 05:16:26 +03:00
parent ace50f75a4
commit 186ae04c0c
5 changed files with 25 additions and 21 deletions
+10 -9
View File
@@ -143,6 +143,16 @@ V4L2ControlInfo::V4L2ControlInfo(const struct v4l2_query_ext_ctrl &ctrl)
* \param value The control value
*/
/**
* \fn V4L2Control::value() const
* \brief Retrieve the value of the control
*
* This method is a const version of V4L2Control::value(), returning a const
* reference to the value.
*
* \return The V4L2 control value
*/
/**
* \fn V4L2Control::value()
* \brief Retrieve the value of the control
@@ -154,15 +164,6 @@ V4L2ControlInfo::V4L2ControlInfo(const struct v4l2_query_ext_ctrl &ctrl)
* \return The V4L2 control value
*/
/**
* \fn V4L2Control::setValue()
* \brief Set the value of the control
* \param value The new V4L2 control value
*
* This method stores the control value, which will be applied to the
* device when calling V4L2Device::setControls().
*/
/**
* \fn V4L2Control::id()
* \brief Retrieve the control ID this instance refers to