[libcamera-devel] [PATCH v2 2/7] cam: Add option to capture StillCaptureRaw stream

Niklas Söderlund niklas.soderlund at ragnatech.se
Thu Mar 26 23:58:39 CET 2020


Add a role name 'stillraw' to request a StillCaptureRaw stream.

Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
---
 src/cam/main.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/cam/main.cpp b/src/cam/main.cpp
index 7cdd215ba5398aec..718740f49762ec7b 100644
--- a/src/cam/main.cpp
+++ b/src/cam/main.cpp
@@ -155,7 +155,7 @@ int CamApp::parseOptions(int argc, char *argv[])
 {
 	KeyValueParser streamKeyValue;
 	streamKeyValue.addOption("role", OptionString,
-				 "Role for the stream (viewfinder, video, still)",
+				 "Role for the stream (viewfinder, video, still, stillraw)",
 				 ArgumentRequired);
 	streamKeyValue.addOption("width", OptionInteger, "Width in pixels",
 				 ArgumentRequired);
@@ -219,6 +219,8 @@ int CamApp::prepareConfig()
 				roles.push_back(StreamRole::VideoRecording);
 			} else if (role == "still") {
 				roles.push_back(StreamRole::StillCapture);
+			} else if (role == "stillraw") {
+				roles.push_back(StreamRole::StillCaptureRaw);
 			} else {
 				std::cerr << "Unknown stream role "
 					  << role << std::endl;
-- 
2.25.1



More information about the libcamera-devel mailing list