summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/request.h3
-rw-r--r--src/libcamera/request.cpp18
2 files changed, 20 insertions, 1 deletions
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index 58de6f00..a93468d7 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -10,6 +10,7 @@
#include <map>
#include <unordered_set>
+#include <libcamera/controls.h>
#include <libcamera/signal.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 fa3ee46d..f0b59858 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -48,11 +48,27 @@ LOG_DEFINE_CATEGORY(Request)
* \param[in] camera The camera that creates the request
*/
Request::Request(Camera *camera)
- : camera_(camera), status_(RequestPending)
+ : camera_(camera), controls_(camera), status_(RequestPending)
{
}
/**
+ * \fn Request::controls()
+ * \brief Retrieve the request's ControlList
+ *
+ * Requests store a list of controls to be applied to all frames captured for
+ * the request. They are created with an empty list of controls that can be
+ * accessed through this method and updated with ControlList::operator[]() or
+ * ControlList::update().
+ *
+ * Only controls supported by the camera to which this request will be
+ * submitted shall be included in the controls list. Attempting to add an
+ * unsupported control causes undefined behaviour.
+ *
+ * \return A reference to the ControlList in this request
+ */
+
+/**
* \fn Request::buffers()
* \brief Retrieve the request's streams to buffers map
*