summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYudhistira Erlandinata <yerlandinata@chromium.org>2024-09-30 16:02:24 +0200
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-10-01 21:01:49 +0200
commit200d535ca85f23e6c562335c5d9badb5be4db28f (patch)
tree3ea3166bef8a435e057675f55a777d37a805a001 /include
parent724bbf7d2506d65e060c9475010738983f5b85bd (diff)
libcamera: controls: Add ControlTypePoint
Add a control_type<> specialization for libcamera::Point to allow storing data of that type in a ControlValue instance. The new control type will be used by controls introduced in the next patches. Signed-off-by: Yudhistira Erlandinata <yerlandinata@chromium.org> Co-developed-by: Becker Hsieh <beckerh@chromium.org> Co-developed-by: Harvey Yang <chenghaoyang@chromium.org> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Harvey Yang <chenghaoyang@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/controls.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index c5131870..ca60bbac 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -35,6 +35,7 @@ enum ControlType {
ControlTypeString,
ControlTypeRectangle,
ControlTypeSize,
+ ControlTypePoint,
};
namespace details {
@@ -97,6 +98,11 @@ struct control_type<Size> {
static constexpr std::size_t size = 0;
};
+template<>
+struct control_type<Point> {
+ static constexpr ControlType value = ControlTypePoint;
+};
+
template<typename T, std::size_t N>
struct control_type<Span<T, N>> : public control_type<std::remove_cv_t<T>> {
static constexpr std::size_t size = N;