summaryrefslogtreecommitdiff
path: root/src/cam/camera_session.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-07 03:45:05 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-22 17:14:05 +0300
commite0704e97ea8907b13c769e0d2958829f94e65a96 (patch)
tree72fa1062eafda388bf7b52258098a2571a2c872a /src/cam/camera_session.cpp
parent721f4b03d80fc7b65cfb4c7ecebe545ef1fe0565 (diff)
cam: Support using multiple cameras concurrently
To allow testing capture from multiple cameras concurrently, turn the --camera option into an array option, and create one CameraSession per specified camera. The code is adapted to iterate over the sessions vector instead of handling a single session. Thanks to all the refactoring previously performed, changes are minimal. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/cam/camera_session.cpp')
-rw-r--r--src/cam/camera_session.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cam/camera_session.cpp b/src/cam/camera_session.cpp
index 90261a8c..0d49fc1a 100644
--- a/src/cam/camera_session.cpp
+++ b/src/cam/camera_session.cpp
@@ -250,9 +250,13 @@ int CameraSession::startCapture()
}
if (captureLimit_)
- std::cout << "Capture " << captureLimit_ << " frames" << std::endl;
+ std::cout << "cam" << cameraIndex_
+ << ": Capture " << captureLimit_ << " frames"
+ << std::endl;
else
- std::cout << "Capture until user interrupts by SIGINT" << std::endl;
+ std::cout << "cam" << cameraIndex_
+ << ": Capture until user interrupts by SIGINT"
+ << std::endl;
return 0;
}