cam: Add optional argument to --capture to specify how many frames to capture
Extend the '--capture' option with and optional numerical argument to be able to specify how many frames to capture before exiting. If the optional argument is not provided the old behavior of running until the user interrupts with a SIGINT is retained. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
+3
-2
@@ -167,8 +167,9 @@ int CamApp::parseOptions(int argc, char *argv[])
|
||||
parser.addOption(OptCamera, OptionString,
|
||||
"Specify which camera to operate on, by name or by index", "camera",
|
||||
ArgumentRequired, "camera");
|
||||
parser.addOption(OptCapture, OptionNone,
|
||||
"Capture until interrupted by user", "capture");
|
||||
parser.addOption(OptCapture, OptionInteger,
|
||||
"Capture until interrupted by user or until <count> frames captured",
|
||||
"capture", ArgumentOptional, "count");
|
||||
parser.addOption(OptFile, OptionString,
|
||||
"Write captured frames to disk\n"
|
||||
"The first '#' character in the file name is expanded to the stream name and frame sequence number.\n"
|
||||
|
||||
Reference in New Issue
Block a user