From 013084310836519b57883176d65fb5e9f6c00f8d Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 2 Sep 2021 05:59:48 +0300 Subject: qcam: Print bytesused for all planes Fix the debug message that prints frame metadata to print the number of bytes used for each plane, not just the first one. Signed-off-by: Laurent Pinchart Reviewed-by: Jean-Michel Hautbois Reviewed-by: Kieran Bingham --- src/qcam/main_window.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/qcam/main_window.cpp') diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index ac853e36..129aeb0b 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -754,10 +755,14 @@ void MainWindow::processViewfinder(FrameBuffer *buffer) fps = lastBufferTime_ && fps ? 1000000000.0 / fps : 0.0; lastBufferTime_ = metadata.timestamp; + QStringList bytesused; + for (const FrameMetadata::Plane &plane : metadata.planes()) + bytesused << QString::number(plane.bytesused); + qDebug().noquote() << QString("seq: %1").arg(metadata.sequence, 6, 10, QLatin1Char('0')) - << "bytesused:" << metadata.planes()[0].bytesused - << "timestamp:" << metadata.timestamp + << "bytesused: {" << bytesused.join(", ") + << "} timestamp:" << metadata.timestamp << "fps:" << Qt::fixed << qSetRealNumberPrecision(2) << fps; /* Render the frame on the viewfinder. */ -- cgit v1.2.1