[PATCH 3/3] apps: cam: Print offset info
Paul Elder
paul.elder at ideasonboard.com
Wed Mar 26 08:51:27 CET 2025
Print frame offset information for each completed request.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
src/apps/cam/camera_session.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp
index 97c1ae44995e..96f9eb351b81 100644
--- a/src/apps/cam/camera_session.cpp
+++ b/src/apps/cam/camera_session.cpp
@@ -465,6 +465,7 @@ void CameraSession::processRequest(Request *request)
<< std::setw(6) << std::setfill('0') << ts / 1000 % 1000000
<< " (" << std::fixed << std::setprecision(2) << fps << " fps)";
+ std::stringstream infoOffset;
for (const auto &[stream, buffer] : buffers) {
const FrameMetadata &metadata = buffer->metadata();
@@ -475,9 +476,14 @@ void CameraSession::processRequest(Request *request)
unsigned int nplane = 0;
for (const FrameMetadata::Plane &plane : metadata.planes()) {
info << plane.bytesused;
- if (++nplane < metadata.planes().size())
+ infoOffset << plane.offset;
+ if (++nplane < metadata.planes().size()) {
info << "/";
+ infoOffset << "/";
+ }
}
+
+ info << " offset: " << infoOffset.str();
}
if (sink_) {
--
2.47.2
More information about the libcamera-devel
mailing list