mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-19 02:15:05 +03:00
cam: Add camera index to file name of capture frames
To prepare for multi-camera support, extend the file naming scheme for captured frames to include the camera index in addition to the stream name and frame number. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
7dab1fa58f
commit
721f4b03d8
3 changed files with 11 additions and 6 deletions
|
@ -136,7 +136,7 @@ int CamApp::parseOptions(int argc, char *argv[])
|
|||
"If the file name ends with a '/', it sets the directory in which\n"
|
||||
"to write files, using the default file name. Otherwise it sets the\n"
|
||||
"full file path and name. The first '#' character in the file name\n"
|
||||
"is expanded to the stream name and frame sequence number.\n"
|
||||
"is expanded to the camera index, stream name and frame sequence number.\n"
|
||||
"The default file name is 'frame-#.bin'.",
|
||||
"file", ArgumentOptional, "filename", false,
|
||||
OptCamera);
|
||||
|
@ -201,7 +201,7 @@ int CamApp::run()
|
|||
if (options_.isSet(OptCamera)) {
|
||||
const OptionValue &camera = options_[OptCamera];
|
||||
session = std::make_unique<CameraSession>(cm_.get(),
|
||||
camera.toString(),
|
||||
camera.toString(), 0,
|
||||
camera.children());
|
||||
if (!session->isValid()) {
|
||||
std::cout << "Failed to create camera session" << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue