Message ID | 20241206101344.767170-14-stefan.klug@ideasonboard.com |
---|---|
State | Accepted |
Delegated to: | Paul Elder |
Headers | show |
Series |
|
Related | show |
Hi Stefan 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@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Thanks j > --- > 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 >
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@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@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 >
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
Allow access to the pipeline handler on a const instance of Camera::Private. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- Changes in v3: - Added this patch --- include/libcamera/internal/camera.h | 1 + src/libcamera/camera.cpp | 5 +++++ 2 files changed, 6 insertions(+)