[v4,16/20] libcamera: camera: Add a const version of the pipe() function
diff mbox series

Message ID 20241216154124.203650-17-stefan.klug@ideasonboard.com
State Accepted
Headers show
Series
  • rkisp1: Fix aspect ratio and ScalerCrop
Related show

Commit Message

Stefan Klug Dec. 16, 2024, 3:40 p.m. UTC
Allow access to the pipeline handler on a const instance of
Camera::Private.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@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(+)

Patch
diff mbox series

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