[libcamera-devel] [RFC PATCH v2 6/9] libcamera: request: Add a ControlList
Kieran Bingham
kieran.bingham at ideasonboard.com
Fri Jun 21 18:13:58 CEST 2019
Provide a ControlList on request objects to facilitate setting controls
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
include/libcamera/request.h | 3 +++
src/libcamera/request.cpp | 10 ++++++++++
2 files changed, 13 insertions(+)
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index 58de6f00a554..8075270a9a12 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -11,6 +11,7 @@
#include <unordered_set>
#include <libcamera/signal.h>
+#include <libcamera/controls.h>
namespace libcamera {
@@ -32,6 +33,7 @@ public:
Request(const Request &) = delete;
Request &operator=(const Request &) = delete;
+ ControlList &controls() { return controls_; }
const std::map<Stream *, Buffer *> &buffers() const { return bufferMap_; }
int setBuffers(const std::map<Stream *, Buffer *> &streamMap);
Buffer *findBuffer(Stream *stream) const;
@@ -50,6 +52,7 @@ private:
bool completeBuffer(Buffer *buffer);
Camera *camera_;
+ ControlList controls_;
std::map<Stream *, Buffer *> bufferMap_;
std::unordered_set<Buffer *> pending_;
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index fa3ee46da440..9a0409b46017 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -52,6 +52,16 @@ Request::Request(Camera *camera)
{
}
+/**
+ * \fn Request::controls()
+ * \brief Retrieve the request's ControlList
+ *
+ * Return a reference to the ControlList that stores all the controls relevant
+ * to this request.
+ *
+ * \return A reference to the ControlList in this request
+ */
+
/**
* \fn Request::buffers()
* \brief Retrieve the request's streams to buffers map
--
2.20.1
More information about the libcamera-devel
mailing list