[v1,3/3] libcamera: stream: StreamConfiguration: Adjust formatting
diff mbox series

Message ID 20260908073640.39654-3-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • [v1,1/3] libcamera: v4l2_videodevice: V4L2DeviceFormat: Expand formatting
Related show

Commit Message

Barnabás Pőcze Sept. 8, 2026, 7:36 a.m. UTC
Adjust the formatting of how a `StreamConfiguration` is formatted to a stream.
Specifically, print the `frameSize` and `stride` members in a format similar
to how it is done for `V4L2DeviceFormat`.

Example:

  configuring streams: (0) 640x480-YUYV[614400/1280]/Rec709/Rec709/Rec601/Limited

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 src/libcamera/stream.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index be0c80cbcf..af730ff8a5 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -407,8 +407,9 @@  std::string StreamConfiguration::toString() const
  */
 std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg)
 {
-	out << cfg.size << "-" << cfg.pixelFormat << "/"
-	    << ColorSpace::toString(cfg.colorSpace);
+	out << cfg.size << '-' << cfg.pixelFormat
+	    << '[' << cfg.frameSize << '/' << cfg.stride << ']'
+	    << '/' << ColorSpace::toString(cfg.colorSpace);
 	return out;
 }