From c0dc218eb8ca8a5b972e6daab14612003c3f4306 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 7 Oct 2019 22:30:27 +0300 Subject: libcamera: v4l2_controls: Add V4L2ControlId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a V4L2 specialisation of the ControlId class, in order to construct a ControlId from a v4l2_query_ext_ctrl. The V4L2ControlId is embedded in V4L2ControlInfo, and thus needs to be copyable to allow for V4L2ControlInfo to be passed to IPAs. The ControlId copy constructor and assignment operators are thus restored, but made protected to avoid the Control class being copyable. This is needed in order to use ControlList for V4L2 controls, as ControlList requires ControlId instances for all controls. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Tested-by: Niklas Söderlund Reviewed-by: Niklas Söderlund --- include/libcamera/controls.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/libcamera/controls.h') diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 5e6708fe..ebc4204f 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -68,11 +68,12 @@ protected: : id_(id), name_(name), type_(type) { } +#ifndef __DOXYGEN__ + ControlId &operator=(const ControlId &) = default; + ControlId(const ControlId &) = default; +#endif private: - ControlId(const ControlId &) = delete; - ControlId &operator=(const ControlId &) = delete; - unsigned int id_; std::string name_; ControlType type_; -- cgit v1.2.1