[libcamera-devel] [PATCH 9/9] cam: Print camera IDs when listing cameras
Niklas Söderlund
niklas.soderlund at ragnatech.se
Sat Jul 18 15:23:24 CEST 2020
Print each cameras name and ID when listing cameras.
Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
src/cam/main.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/cam/main.cpp b/src/cam/main.cpp
index 2512fe9da782165b..50422788321eaba8 100644
--- a/src/cam/main.cpp
+++ b/src/cam/main.cpp
@@ -302,7 +302,8 @@ int CamApp::run()
unsigned int index = 1;
for (const std::shared_ptr<Camera> &cam : cm_->cameras()) {
- std::cout << index << ": " << cam->name() << std::endl;
+ std::cout << index << ": " << cam->name()
+ << " (" << cam->id() << ")" << std::endl;
index++;
}
}
--
2.27.0
More information about the libcamera-devel
mailing list