[libcamera-devel] [RFC 1/3] libcamera: stream: Add setters for image sizes and format
Niklas Söderlund
niklas.soderlund at ragnatech.se
Sun Jan 27 01:28:56 CET 2019
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 :-)
> +
> 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
More information about the libcamera-devel
mailing list