[libcamera-devel] [PATCH 08/13] libcamera: request: Allow read only access to controls
Niklas Söderlund
niklas.soderlund at ragnatech.se
Wed Aug 28 03:17:05 CEST 2019
Allow the controls in a Request to be examined from a const
environment.
Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
include/libcamera/request.h | 1 +
src/libcamera/request.cpp | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index 570924c5ef5e2425..f5de5257bba3f2bb 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -40,6 +40,7 @@ public:
~Request();
ControlList &controls() { return controls_; }
+ const ControlList &controls() const { return controls_; }
const std::map<Stream *, Buffer *> &buffers() const { return bufferMap_; }
int addBuffer(std::unique_ptr<Buffer> buffer);
Buffer *findBuffer(Stream *stream) const;
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index 4d7bf177534267ac..79e456db1b7dd282 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -84,6 +84,11 @@ Request::~Request()
* \return A reference to the ControlList in this request
*/
+/**
+ * \fn Request::controls() const
+ * \sa Request::controls()
+ */
+
/**
* \fn Request::buffers()
* \brief Retrieve the request's streams to buffers map
--
2.22.1
More information about the libcamera-devel
mailing list