summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/request.h2
-rw-r--r--src/libcamera/request.cpp14
2 files changed, 16 insertions, 0 deletions
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index e3db5243..2d5a5964 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -37,6 +37,7 @@ public:
~Request();
ControlList &controls() { return *controls_; }
+ ControlList &metadata() { return *metadata_; }
const std::map<Stream *, Buffer *> &buffers() const { return bufferMap_; }
int addBuffer(std::unique_ptr<Buffer> buffer);
Buffer *findBuffer(Stream *stream) const;
@@ -58,6 +59,7 @@ private:
Camera *camera_;
CameraControlValidator *validator_;
ControlList *controls_;
+ ControlList *metadata_;
std::map<Stream *, Buffer *> bufferMap_;
std::unordered_set<Buffer *> pending_;
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index 19f6d0b9..23d3ab6f 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -65,6 +65,11 @@ Request::Request(Camera *camera, uint64_t cookie)
*/
validator_ = new CameraControlValidator(camera);
controls_ = new ControlList(validator_);
+
+ /**
+ * \todo: Add a validator for metadata controls.
+ */
+ metadata_ = new ControlList(nullptr);
}
Request::~Request()
@@ -74,6 +79,7 @@ Request::~Request()
delete buffer;
}
+ delete metadata_;
delete controls_;
delete validator_;
}
@@ -162,6 +168,14 @@ Buffer *Request::findBuffer(Stream *stream) const
}
/**
+ * \fn Request::metadata()
+ * \brief Retrieve the request's metadata
+ * \todo Offer a read-only API towards applications while keeping a read/write
+ * API internally.
+ * \return The metadata associated with the request
+ */
+
+/**
* \fn Request::cookie()
* \brief Retrieve the cookie set when the request was created
* \return The request cookie