[PATCH v4 16/20] libcamera: camera: Add a const version of the pipe() function
Stefan Klug
stefan.klug at ideasonboard.com
Mon Dec 16 16:40:56 CET 2024
Allow access to the pipeline handler on a const instance of
Camera::Private.
Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
---
Changes in v4:
- Collected tags
- Updated title
Changes in v3:
- Added this patch
---
include/libcamera/internal/camera.h | 1 +
src/libcamera/camera.cpp | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/include/libcamera/internal/camera.h b/include/libcamera/internal/camera.h
index 0add0428bb5d..2bb00bbcb644 100644
--- a/include/libcamera/internal/camera.h
+++ b/include/libcamera/internal/camera.h
@@ -32,6 +32,7 @@ public:
~Private();
PipelineHandler *pipe() { return pipe_.get(); }
+ const PipelineHandler *pipe() const { return pipe_.get(); }
std::list<Request *> queuedRequests_;
ControlInfoMap controlInfo_;
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 4c865a46af53..69a7ee5353f1 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -603,6 +603,11 @@ Camera::Private::~Private()
* \return The pipeline handler that created this camera
*/
+/**
+ * \fn Camera::Private::pipe() const
+ * \copydoc Camera::Private::pipe()
+ */
+
/**
* \fn Camera::Private::validator()
* \brief Retrieve the control validator related to this camera
--
2.43.0
More information about the libcamera-devel
mailing list