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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2020-05-17 23:58:31 +03:00
parent 063c9969f5
commit 2288550f7d
3 changed files with 37 additions and 0 deletions

View file

@ -132,6 +132,12 @@ int CamApp::parseOptions(int argc, char *argv[])
"Capture until interrupted by user or until <count> 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"