[libcamera-devel] [RFC 1/3] libcamera: stream: Add setters for image sizes and format

Jacopo Mondi jacopo at jmondi.org
Sun Jan 27 11:22:08 CET 2019


Hi Niklas,

On Sun, Jan 27, 2019 at 01:28:56AM +0100, Niklas Söderlund wrote:
> Hi Jacopo,
>
> Thanks for your work.
>
> On 2019-01-26 16:13:16 +0100, Jacopo Mondi wrote:
> > Add methods to set width, height and pixelformat of a
> > StreamConfiguration instance.
> >
> > Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> > ---
> >  include/libcamera/stream.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
> > index 8750797..ef7b32a 100644
> > --- a/include/libcamera/stream.h
> > +++ b/include/libcamera/stream.h
> > @@ -33,6 +33,10 @@ public:
> >  	void setDimension(unsigned int width, unsigned int height);
> >  	void setPixelFormat(unsigned int pixelformat);
> >
> > +	void setWidth(unsigned int width) { width_ = width; }
> > +	void setHeight(unsigned int height) { height_ = height; }
> > +	void setPixelformat(unsigned int pix) { pixelformat_ = pix; }
>
> This looks odd, there is already a setPixelFormat() defined just above.
> In any case when you rebase this RFC all parameters of
> StreamConfiguration are now public so no longer a need for setters and
> getters :-)
>

You are correct. Please ignore this patch.

Thanks
  j

> > +
> >  private:
> >  	unsigned int id_;
> >  	unsigned int width_;
> > --
> > 2.20.1
> >
> > _______________________________________________
> > libcamera-devel mailing list
> > libcamera-devel at lists.libcamera.org
> > https://lists.libcamera.org/listinfo/libcamera-devel
>
> --
> Regards,
> Niklas Söderlund
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20190127/ba079800/attachment.sig>


More information about the libcamera-devel mailing list