summaryrefslogtreecommitdiff
path: root/src/apps/cam/main.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-10-19 16:01:32 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-10-23 16:06:12 +0300
commit7e5f1e1cedf5bb299cede5418fab5307c3e65441 (patch)
tree6aa48965af6e5c8982cc36b8f71bcacee2d96994 /src/apps/cam/main.cpp
parentc65e40b8480ffb5f50e01a4e6713164c7194a937 (diff)
apps: cam: Add option to set stream orientation
Add a '--orientation|-o' option to the cam test application to set an orientation to the image stream. Supported values are the ones obtained by applying flips to the camera sensor: - rot0: no rotation - rot180: rotate 180 degrees - flip: vertical flip - mirror: horizontal flip Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/apps/cam/main.cpp')
-rw-r--r--src/apps/cam/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/apps/cam/main.cpp b/src/apps/cam/main.cpp
index 5d8a57bc..179cc376 100644
--- a/src/apps/cam/main.cpp
+++ b/src/apps/cam/main.cpp
@@ -133,6 +133,11 @@ int CamApp::parseOptions(int argc, char *argv[])
"Capture until interrupted by user or until <count> frames captured",
"capture", ArgumentOptional, "count", false,
OptCamera);
+
+ parser.addOption(OptOrientation, OptionString,
+ "Desired image orientation (rot0, rot180, mirror, flip)",
+ "orientation", ArgumentRequired, "orientation", false,
+ OptCamera);
#ifdef HAVE_KMS
parser.addOption(OptDisplay, OptionString,
"Display viewfinder through DRM/KMS on specified connector",