diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-07 22:23:21 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-13 20:37:46 +0300 |
commit | 90d0f193eb2102a6aee3c519eda5ced67a6841f1 (patch) | |
tree | 10dde00925e87c9268e638424f87a340413e5cd7 /src/libcamera/v4l2_device.cpp | |
parent | c0dc218eb8ca8a5b972e6daab14612003c3f4306 (diff) |
libcamera: v4l2_controls: Remove V4L2ControlInfo type field
The V4L2ControlInfo type field stores the V4L2 control type. It partly
duplicates the V4L2ControlInfo id().type() that stores the corresponding
libcamera control type. The two fields are not strictly identical, but
having two types doesn't provide us with any extra value. As this is
confusing, remove the V4L2ControlInfo type field.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/v4l2_device.cpp')
-rw-r--r-- | src/libcamera/v4l2_device.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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: |