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>
This commit is contained in:
parent
721f4b03d8
commit
e0704e97ea
2 changed files with 45 additions and 30 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue