[libcamera-devel] [PATCH v4 17/31] libcamera: request: Add camera() getter method
Jacopo Mondi
jacopo at jmondi.org
Wed Mar 20 17:30:41 CET 2019
Add a "camera()" getter method to the Request class to retrieve the
Camera instance the request has been sent to.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
include/libcamera/request.h | 1 +
src/libcamera/request.cpp | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index 1bf90de2c6f9..56d179e5f2f5 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -35,6 +35,7 @@ public:
int setBuffers(const std::map<Stream *, Buffer *> &streamMap);
Buffer *findBuffer(Stream *stream) const;
const std::set<Stream *> &streams() const { return streams_; }
+ Camera *camera() const { return camera_; }
Status status() const { return status_; }
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index 22c516208ede..51ab6c4e71b2 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -58,6 +58,13 @@ Request::Request(Camera *camera)
* \return The set of streams contained in the request
*/
+/**
+ * \fn Request::camera()
+ * \brief Retrieve the camera the request has been sent to
+ *
+ * \return Pointer to the camera instance the request has been sent to
+ */
+
/**
* \brief Set the streams to capture with associated buffers
* \param[in] streamMap The map of streams to buffers
--
2.21.0
More information about the libcamera-devel
mailing list