[libcamera-devel] [PATCH 07/11] android: camera_stream: Return non-const pointer from camera3Stream()

Hirokazu Honda hiroh at chromium.org
Tue Oct 19 06:51:49 CEST 2021


Hi Umang and Laurent, thank you for the patch.

On Tue, Oct 19, 2021 at 1:31 AM Jacopo Mondi <jacopo at jmondi.org> wrote:
>
> Hi laurent,
>
> On Mon, Oct 18, 2021 at 06:59:19PM +0530, Umang Jain wrote:
> > From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> >
> > The camera3_stream_t instances are used to interact with the camera
> > service, whose API uses non-const pointers. Replace the const reference
> > returned by CameraStream::camera3Stream() with a non-const pointer. It
> > turns out that nobody calls this function, but new users will be
> > introduced in subsequent commits.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>

Reviewed-by: Hirokazu Honda <hiroh at chromium.org>

> Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
>
> Thanks
>   j
>
> > ---
> >  src/android/camera_stream.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h
> > index 197bd995..85064268 100644
> > --- a/src/android/camera_stream.h
> > +++ b/src/android/camera_stream.h
> > @@ -114,7 +114,7 @@ public:
> >                    camera3_stream_t *camera3Stream, unsigned int index);
> >
> >       Type type() const { return type_; }
> > -     const camera3_stream_t &camera3Stream() const { return *camera3Stream_; }
> > +     camera3_stream_t *camera3Stream() const { return camera3Stream_; }
> >       const libcamera::StreamConfiguration &configuration() const;
> >       libcamera::Stream *stream() const;
> >
> > --
> > 2.31.0
> >


More information about the libcamera-devel mailing list