diff options
author | Yudhistira Erlandinata <yerlandinata@chromium.org> | 2024-10-29 16:07:12 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-11-28 17:46:50 +0000 |
commit | 86902b39d7cd6701139f3de3a4ef4da57f2502ed (patch) | |
tree | 20d13b012a4990a29e4c3cd4373c830fd6794227 /include | |
parent | 1197fff4821e119c5aeca017fa095f2225aed292 (diff) |
libcamera: Extend u32 control type
V4L2 Controls support a wide variety of types not yet supported by the
ControlValue type system.
Extend the libcamera ControlValue types to support an explicit 32 bit
unsigned integer type, and map that to the corresponding
V4L2_CTRL_TYPE_U32 type within the v4l2_device support class.
Signed-off-by: Yudhistira Erlandinata <yerlandinata@chromium.org>
Co-developed-by: Harvey Yang <chenghaoyang@chromium.org>
Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/controls.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 3cfe2de5..fd5005bc 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -29,6 +29,7 @@ enum ControlType { ControlTypeNone, ControlTypeBool, ControlTypeByte, + ControlTypeUnsigned32, ControlTypeInteger32, ControlTypeInteger64, ControlTypeFloat, @@ -63,6 +64,12 @@ struct control_type<uint8_t> { }; template<> +struct control_type<uint32_t> { + static constexpr ControlType value = ControlTypeUnsigned32; + static constexpr std::size_t size = 0; +}; + +template<> struct control_type<int32_t> { static constexpr ControlType value = ControlTypeInteger32; static constexpr std::size_t size = 0; |