[libcamera-devel,v5,15/17] cam: Add option to print the Request metadata
diff mbox series

Message ID 20210503104152.34048-16-jacopo@jmondi.org
State Accepted
Headers show
Series
  • Support SensorTimestamp metadata
Related show

Commit Message

Jacopo Mondi May 3, 2021, 10:41 a.m. UTC
Add the "--metadata" option to the cam tool, which will be used to
print the metadata associated with a completed capture request.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/cam/main.cpp | 3 +++
 src/cam/main.h   | 1 +
 2 files changed, 4 insertions(+)

Patch
diff mbox series

diff --git a/src/cam/main.cpp b/src/cam/main.cpp
index 994fbb343029..70e9f62c7cb0 100644
--- a/src/cam/main.cpp
+++ b/src/cam/main.cpp
@@ -197,6 +197,9 @@  int CamApp::parseOptions(int argc, char *argv[])
 	parser.addOption(OptStrictFormats, OptionNone,
 			 "Do not allow requested stream format(s) to be adjusted",
 			 "strict-formats");
+	parser.addOption(OptMetadata, OptionNone,
+			 "Print the metadata for completed requests",
+			 "metadata");
 
 	options_ = parser.parse(argc, argv);
 	if (!options_.valid())
diff --git a/src/cam/main.h b/src/cam/main.h
index ea8dfd330830..d22451f59817 100644
--- a/src/cam/main.h
+++ b/src/cam/main.h
@@ -19,6 +19,7 @@  enum {
 	OptStream = 's',
 	OptListControls = 256,
 	OptStrictFormats = 257,
+	OptMetadata = 258,
 };
 
 #endif /* __CAM_MAIN_H__ */