[PATCH] libcamera: stream: Add color space to configuration string representation

Milan Zamazal mzamazal at redhat.com
Fri Apr 25 09:29:52 CEST 2025


Laurent Pinchart <laurent.pinchart at ideasonboard.com> writes:

> Extend the string representation of StreamConfiguration, as returned by
> the toString() and operator<<() functions, with color space information.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

Reviewed-by: Milan Zamazal <mzamazal at redhat.com>

> ---
>  src/libcamera/stream.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
> index 978d72752b00..f091487c9353 100644
> --- a/src/libcamera/stream.cpp
> +++ b/src/libcamera/stream.cpp
> @@ -407,7 +407,8 @@ std::string StreamConfiguration::toString() const
>   */
>  std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg)
>  {
> -	out << cfg.size << "-" << cfg.pixelFormat;
> +	out << cfg.size << "-" << cfg.pixelFormat << "/"
> +	    << ColorSpace::toString(cfg.colorSpace);
>  	return out;
>  }
>
>
> base-commit: 3569fed7afc16fe31dfbccbfbaeb72a741bc8973
> --
> Regards,
>
> Laurent Pinchart



More information about the libcamera-devel mailing list