[PATCH v3 13/17] camera: Add a const version of the pipe() function
Paul Elder
paul.elder at ideasonboard.com
Thu Dec 12 13:05:09 CET 2024
On Fri, Dec 06, 2024 at 11:13:35AM +0100, Stefan Klug wrote:
> 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: Paul Elder <paul.elder at ideasonboard.com>
> ---
> 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