[libcamera-devel] [PATCH 4/5] cam: Add a --script option
Jacopo Mondi
jacopo at jmondi.org
Wed May 18 19:19:20 CEST 2022
Add a "--script" option to the cam test application to allow specify a
capture script to be used to drive the capture session.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/cam/main.cpp | 4 ++++
src/cam/main.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/src/cam/main.cpp b/src/cam/main.cpp
index fd3108b05d25..3428075c03dd 100644
--- a/src/cam/main.cpp
+++ b/src/cam/main.cpp
@@ -162,6 +162,10 @@ int CamApp::parseOptions(int argc, char *argv[])
"Print the metadata for completed requests",
"metadata", ArgumentNone, nullptr, false,
OptCamera);
+ parser.addOption(OptCaptureScript, OptionString,
+ "Load a capture session configuration script from a file\n",
+ "script", ArgumentRequired, "script", false,
+ OptCamera);
options_ = parser.parse(argc, argv);
if (!options_.valid())
diff --git a/src/cam/main.h b/src/cam/main.h
index 2b2858084bb1..5ec20e1496eb 100644
--- a/src/cam/main.h
+++ b/src/cam/main.h
@@ -22,4 +22,5 @@ enum {
OptListControls = 256,
OptStrictFormats = 257,
OptMetadata = 258,
+ OptCaptureScript = 259,
};
--
2.35.1
More information about the libcamera-devel
mailing list