Message ID | 20190126151318.28087-2-jacopo@jmondi.org |
---|---|
State | Superseded |
Delegated to: | Jacopo Mondi |
Headers | show |
Series |
|
Related | show |
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@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 :-) > + > private: > unsigned int id_; > unsigned int width_; > -- > 2.20.1 > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
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@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@lists.libcamera.org > > https://lists.libcamera.org/listinfo/libcamera-devel > > -- > Regards, > Niklas Söderlund
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; } + private: unsigned int id_; unsigned int width_;
Add methods to set width, height and pixelformat of a StreamConfiguration instance. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> --- include/libcamera/stream.h | 4 ++++ 1 file changed, 4 insertions(+)