[libcamera-devel] [PATCH v2 09/14] libcamera: request: Allow read only access to controls

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Sep 4 20:38:10 CEST 2019


Hi Niklas,

On Wed, Sep 04, 2019 at 09:35:16PM +0300, Laurent Pinchart wrote:
> On Fri, Aug 30, 2019 at 01:26:48AM +0200, Niklas Söderlund wrote:
> > Allow the controls in a Request to be examined from a const
> > environment.
> > 
> > Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> 
> > ---
> >  include/libcamera/request.h | 1 +
> >  src/libcamera/request.cpp   | 5 +++++
> >  2 files changed, 6 insertions(+)
> > 
> > diff --git a/include/libcamera/request.h b/include/libcamera/request.h
> > index 570924c5ef5e2425..f5de5257bba3f2bb 100644
> > --- a/include/libcamera/request.h
> > +++ b/include/libcamera/request.h
> > @@ -40,6 +40,7 @@ public:
> >  	~Request();
> >  
> >  	ControlList &controls() { return controls_; }
> > +	const ControlList &controls() const { return controls_; }
> >  	const std::map<Stream *, Buffer *> &buffers() const { return bufferMap_; }
> >  	int addBuffer(std::unique_ptr<Buffer> buffer);
> >  	Buffer *findBuffer(Stream *stream) const;
> > diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
> > index b8b4dfb4b7549163..bdb4f908fb664ccf 100644
> > --- a/src/libcamera/request.cpp
> > +++ b/src/libcamera/request.cpp
> > @@ -84,6 +84,11 @@ Request::~Request()
> >   * \return A reference to the ControlList in this request
> >   */
> >  
> > +/**
> > + * \fn Request::controls() const
> > + * \sa Request::controls()

Actually I think you should at least copy the brief, otherwise the
method will have no description in the list of member functions.

> > + */
> > +
> >  /**
> >   * \fn Request::buffers()
> >   * \brief Retrieve the request's streams to buffers map

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list