diff --git a/RevidCLI.go b/RevidCLI.go index 66af3c95..ee42b52b 100644 --- a/RevidCLI.go +++ b/RevidCLI.go @@ -111,7 +111,7 @@ func main() { flag.Parse() - switch configFlags[inputPtr] { + switch *configFlags[inputPtr] { case "Raspivid": config.Input = Raspivid case "Rtp": @@ -120,12 +120,12 @@ func main() { config.Input = File } - switch configFlags[inputCodecPtr] { + switch *configFlags[inputCodecPtr] { case "H264Codec": config.InputCodec = H264Codec } - switch configFlags[outputPtr] { + switch *configFlags[outputPtr] { case "File": config.Output = File case "Http": @@ -134,14 +134,14 @@ func main() { config.Output = Rtmp } - switch configFlags[rtmpMethodPtr] { + switch *configFlags[rtmpMethodPtr] { case "Ffmpeg": config.RtmpMethod = Ffmpeg case "LibRtmp": config.RtmpMethod = LibRtmp } - switch configFlags[packetisationPtr] { + switch *configFlags[packetisationPtr] { case "None": config.Packetisation = None case "Rtp": @@ -150,32 +150,32 @@ func main() { config.Packetisation = Flv } - switch configFlags[quantisationModePtr] { + switch *configFlags[quantisationModePtr] { case "QuantizationOn": config.Quantization = QuantizationOn case "QuantizationOff": config.Quantization = QuantizationOff } - switch configFlags[verbosityPtr] { + switch *configFlags[verbosityPtr] { case "No": config.Verbosity = No case "Yes": config.Verbosity = Yes } - config.FramesPerClip = configFlags[framesPerClipPtr] - config.RtmpUrl = configFlags[rtmpUrlPtr] - config.Bitrate = configFlags[bitratePtr] - config.OutputFileName = configFlags[outputFileNamePtr] - config.InputFileName = configFlags[inputFileNamePtr] - config.Height = configFlags[heightPtr] - config.Width = configFlags[widthPtr] - config.FrameRate = configFlags[frameRatePtr] - config.HttpAddress = configFlags[httpAddressPtr] - config.Quantization = configFlags[quantisationPtr] - config.Timeout = configFlags[timeoutPtr] - config.IntraRefreshPeriod = configFlags[intraRefreshPeriodPtr] + config.FramesPerClip = *configFlags[framesPerClipPtr] + config.RtmpUrl = *configFlags[rtmpUrlPtr] + config.Bitrate = *configFlags[bitratePtr] + config.OutputFileName = *configFlags[outputFileNamePtr] + config.InputFileName = *configFlags[inputFileNamePtr] + config.Height = *configFlags[heightPtr] + config.Width = *configFlags[widthPtr] + config.FrameRate = *configFlags[frameRatePtr] + config.HttpAddress = *configFlags[httpAddressPtr] + config.Quantization = *configFlags[quantisationPtr] + config.Timeout = *configFlags[timeoutPtr] + config.IntraRefreshPeriod = *configFlags[intraRefreshPeriodPtr] createRevidInstance() revidInst.Start()