summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-26 20:37:09 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-11-20 21:47:40 +0200
commit113cfb1e0821d638b66b3fb8d85c5025b2a089c5 (patch)
treef9d0862a86bc3ef57e95564827bbf31a8d797d99
parent81493f36e19a02d80517e88bc1e8fc6a492e7fd5 (diff)
libcamera: controls: Make ControList constructor public
We need to construct empty ControlList objects to serialization. Make the constructor public. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r--include/libcamera/controls.h1
-rw-r--r--src/libcamera/controls.cpp11
2 files changed, 12 insertions, 0 deletions
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index a0379d52..d692e088 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -189,6 +189,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 50f37c6b..9c6474ad 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -591,6 +591,17 @@ void ControlInfoMap::generateIdmap()
*/
/**
+ * \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
* \param[in] validator The validator (may be null)