[PATCH 2/2] apps: cam: Print control array sizes
Paul Elder
paul.elder at ideasonboard.com
Wed Sep 11 17:35:23 CEST 2024
Now that controls can be queried for array information, print it in
--list-controls when applicable.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
src/apps/cam/camera_session.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp
index 37de6c9f3..9c7f84993 100644
--- a/src/apps/cam/camera_session.cpp
+++ b/src/apps/cam/camera_session.cpp
@@ -169,6 +169,11 @@ void CameraSession::listControls() const
std::cout << " - " << id->enumToString(val) << " (" << val << ")" << std::endl;
}
}
+
+ if (id->isArray()) {
+ std::size_t size = id->size();
+ std::cout << " Size: " << (size == std::numeric_limits<std::size_t>::max() ? "n" : std::to_string(size)) << std::endl;
+ }
}
}
--
2.39.2
More information about the libcamera-devel
mailing list