summaryrefslogtreecommitdiff
path: root/src/qcam/main_window.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-02 05:59:48 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-07 19:18:48 +0300
commit013084310836519b57883176d65fb5e9f6c00f8d (patch)
tree1e57ad8e2ce9e570def7a524a5576df61aed9840 /src/qcam/main_window.cpp
parentdd8b6a2cc92b58d12845b42b1f4742482647d859 (diff)
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/qcam/main_window.cpp')
-rw-r--r--src/qcam/main_window.cpp9
1 files changed, 7 insertions, 2 deletions
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 <QInputDialog>
#include <QMutexLocker>
#include <QStandardPaths>
+#include <QStringList>
#include <QTimer>
#include <QToolBar>
#include <QToolButton>
@@ -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. */