[libcamera-devel] [PATCH v2 08/24] libcamera: controls: Make ControList constructor public
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Nov 8 21:53:53 CET 2019
We need to construct empty ControlList objects to serialization. Make
the constructor public.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
include/libcamera/controls.h | 1 +
src/libcamera/controls.cpp | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index 6bad36cbc369..b35e006bc046 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -188,6 +188,7 @@ private:
using ControlListMap = std::unordered_map<unsigned int, ControlValue>;
public:
+ ControlList();
ControlList(const ControlIdMap &idmap, ControlValidator *validator = nullptr);
ControlList(const ControlInfoMap &info, ControlValidator *validator = nullptr);
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index ae6ca2a7cf7e..178ce3d99bce 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -588,6 +588,17 @@ void ControlInfoMap::generateIdmap()
* controls.
*/
+/**
+ * \brief Construct a ControlList not associated with any object
+ *
+ * This constructor is meant to support ControlList serialization and shall not
+ * be used directly by application.
+ */
+ControlList::ControlList()
+ : validator_(nullptr), idmap_(nullptr)
+{
+}
+
/**
* \brief Construct a ControlList with an optional control validator
* \param[in] idmap The ControlId map for the control list target object
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list