diff options
-rw-r--r-- | src/libcamera/include/v4l2_controls.h | 2 | ||||
-rw-r--r-- | src/libcamera/v4l2_controls.cpp | 7 | ||||
-rw-r--r-- | src/libcamera/v4l2_device.cpp | 8 |
3 files changed, 4 insertions, 13 deletions
diff --git a/src/libcamera/include/v4l2_controls.h b/src/libcamera/include/v4l2_controls.h index 71ce377f..949ca21c 100644 --- a/src/libcamera/include/v4l2_controls.h +++ b/src/libcamera/include/v4l2_controls.h @@ -32,14 +32,12 @@ public: V4L2ControlInfo(const struct v4l2_query_ext_ctrl &ctrl); const ControlId &id() const { return id_; } - unsigned int type() const { return type_; } size_t size() const { return size_; } const ControlRange &range() const { return range_; } private: V4L2ControlId id_; - unsigned int type_; size_t size_; ControlRange range_; diff --git a/src/libcamera/v4l2_controls.cpp b/src/libcamera/v4l2_controls.cpp index a630a258..3f5f3ff1 100644 --- a/src/libcamera/v4l2_controls.cpp +++ b/src/libcamera/v4l2_controls.cpp @@ -127,7 +127,6 @@ V4L2ControlId::V4L2ControlId(const struct v4l2_query_ext_ctrl &ctrl) V4L2ControlInfo::V4L2ControlInfo(const struct v4l2_query_ext_ctrl &ctrl) : id_(ctrl) { - type_ = ctrl.type; size_ = ctrl.elem_size * ctrl.elems; if (ctrl.type == V4L2_CTRL_TYPE_INTEGER64) @@ -145,12 +144,6 @@ V4L2ControlInfo::V4L2ControlInfo(const struct v4l2_query_ext_ctrl &ctrl) */ /** - * \fn V4L2ControlInfo::type() - * \brief Retrieve the control type as defined by V4L2_CTRL_TYPE_* - * \return The V4L2 control type - */ - -/** * \fn V4L2ControlInfo::size() * \brief Retrieve the control value data size (in bytes) * \return The V4L2 control value data size diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index 466c3d41..8c599843 100644 --- a/src/libcamera/v4l2_device.cpp +++ b/src/libcamera/v4l2_device.cpp @@ -262,8 +262,8 @@ int V4L2Device::setControls(V4L2ControlList *ctrls) v4l2Ctrls[i].id = ctrl->id(); /* Set the v4l2_ext_control value for the write operation. */ - switch (info->type()) { - case V4L2_CTRL_TYPE_INTEGER64: + switch (info->id().type()) { + case ControlTypeInteger64: v4l2Ctrls[i].value64 = ctrl->value().get<int64_t>(); break; default: @@ -392,8 +392,8 @@ void V4L2Device::updateControls(V4L2ControlList *ctrls, const V4L2ControlInfo *info = controlInfo[i]; V4L2Control *ctrl = ctrls->getByIndex(i); - switch (info->type()) { - case V4L2_CTRL_TYPE_INTEGER64: + switch (info->id().type()) { + case ControlTypeInteger64: ctrl->value().set<int64_t>(v4l2Ctrl->value64); break; default: |