From 36169f0142028ce4dbe5d41f878e774017cbf635 Mon Sep 17 00:00:00 2001 From: Saxon1 Date: Thu, 3 May 2018 18:02:36 +0930 Subject: [PATCH] Fixing revidcli --- RevidCLI.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/RevidCLI.go b/RevidCLI.go index e2720f12..4d83c2bf 100644 --- a/RevidCLI.go +++ b/RevidCLI.go @@ -63,7 +63,7 @@ const ( quantizationPtr = 16 timeoutPtr = 17 intraRefreshPeriodPtr = 18 - rotatePtr = 19 + flipPtr = 19 ) // Other misc consts @@ -119,7 +119,7 @@ func main() { {"Quantization", "Desired quantization value"}, {"Timeout", "Http timeout in seconds"}, {"IntraRefreshPeriod", "The IntraRefreshPeriod i.e. how many keyframes we send"}, - {"Rotate", "Rotate video the specified number of degrees"}, + {"Flip", "Flip video"}, } // Create the configFlags based on the flagNames array @@ -211,6 +211,16 @@ func main() { fmt.Println("Bad verbosity argument!") } + switch *configFlags[flipPtr] { + case "No": + config.Flip = revid.No + case "Yes": + config.Flip = revid.Yes + case "": + default: + fmt.Println("Bad flip option!") + } + config.FramesPerClip = *configFlags[framesPerClipPtr] config.RtmpUrl = *configFlags[rtmpUrlPtr] config.Bitrate = *configFlags[bitratePtr] @@ -223,7 +233,6 @@ func main() { config.Quantization = *configFlags[quantizationPtr] config.Timeout = *configFlags[timeoutPtr] config.IntraRefreshPeriod = *configFlags[intraRefreshPeriodPtr] - config.Rotate = *configFlags[rotatePtr] // Also give the config a logger object config.Logger = smartLogger.New(loggerVerbosity, smartLogger.White)