From 2288550f7d9cb260021de436bb8ff8c0e8ea86be Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 17 May 2020 23:58:31 +0300 Subject: cam: Add support for viewfinder through DRM/KMS Use the KMSSink class to display the viewfinder stream, if any, through DRM/KMS. The output connector is selected through the new -D/--display argument. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Umang Jain Reviewed-by: Kieran Bingham --- src/cam/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/cam/main.cpp') diff --git a/src/cam/main.cpp b/src/cam/main.cpp index 34cbc322..c7f664b9 100644 --- a/src/cam/main.cpp +++ b/src/cam/main.cpp @@ -132,6 +132,12 @@ int CamApp::parseOptions(int argc, char *argv[]) "Capture until interrupted by user or until frames captured", "capture", ArgumentOptional, "count", false, OptCamera); +#ifdef HAVE_KMS + parser.addOption(OptDisplay, OptionString, + "Display viewfinder through DRM/KMS on specified connector", + "display", ArgumentOptional, "connector", false, + OptCamera); +#endif parser.addOption(OptFile, OptionString, "Write captured frames to disk\n" "If the file name ends with a '/', it sets the directory in which\n" -- cgit v1.2.1