From b43520d70ecd9db68c3ae50a20ba46dcef019836 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Jul 2025 01:26:45 +0300 Subject: [PATCH] libcamera: v4l2_videodevice: Add color space to format string representation To debug color issues in a pipeline it is necessary to know the color space used. Therefore add the color space to the string representation of V4L2DeviceFormat that is returned by toString() and operator<<(). The format gets for example printed as [0:05:52.981684000] [230] DEBUG RkISP1 rkisp1_path.cpp:468 Configured main resizer video device with 1920x1080-NV12/sYCC Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- src/libcamera/v4l2_videodevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 76bdad40..71cc7e89 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -446,7 +446,8 @@ const std::string V4L2DeviceFormat::toString() const */ std::ostream &operator<<(std::ostream &out, const V4L2DeviceFormat &f) { - out << f.size << "-" << f.fourcc; + out << f.size << "-" << f.fourcc << "/" + << ColorSpace::toString(f.colorSpace); return out; }