mirror of https://bitbucket.org/ausocean/av.git
using values pointed at by pointers, instead of using pointers :S
This commit is contained in:
parent
bf5a2075bb
commit
2b025b82aa
38
RevidCLI.go
38
RevidCLI.go
|
@ -111,7 +111,7 @@ func main() {
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
switch configFlags[inputPtr] {
|
switch *configFlags[inputPtr] {
|
||||||
case "Raspivid":
|
case "Raspivid":
|
||||||
config.Input = Raspivid
|
config.Input = Raspivid
|
||||||
case "Rtp":
|
case "Rtp":
|
||||||
|
@ -120,12 +120,12 @@ func main() {
|
||||||
config.Input = File
|
config.Input = File
|
||||||
}
|
}
|
||||||
|
|
||||||
switch configFlags[inputCodecPtr] {
|
switch *configFlags[inputCodecPtr] {
|
||||||
case "H264Codec":
|
case "H264Codec":
|
||||||
config.InputCodec = H264Codec
|
config.InputCodec = H264Codec
|
||||||
}
|
}
|
||||||
|
|
||||||
switch configFlags[outputPtr] {
|
switch *configFlags[outputPtr] {
|
||||||
case "File":
|
case "File":
|
||||||
config.Output = File
|
config.Output = File
|
||||||
case "Http":
|
case "Http":
|
||||||
|
@ -134,14 +134,14 @@ func main() {
|
||||||
config.Output = Rtmp
|
config.Output = Rtmp
|
||||||
}
|
}
|
||||||
|
|
||||||
switch configFlags[rtmpMethodPtr] {
|
switch *configFlags[rtmpMethodPtr] {
|
||||||
case "Ffmpeg":
|
case "Ffmpeg":
|
||||||
config.RtmpMethod = Ffmpeg
|
config.RtmpMethod = Ffmpeg
|
||||||
case "LibRtmp":
|
case "LibRtmp":
|
||||||
config.RtmpMethod = LibRtmp
|
config.RtmpMethod = LibRtmp
|
||||||
}
|
}
|
||||||
|
|
||||||
switch configFlags[packetisationPtr] {
|
switch *configFlags[packetisationPtr] {
|
||||||
case "None":
|
case "None":
|
||||||
config.Packetisation = None
|
config.Packetisation = None
|
||||||
case "Rtp":
|
case "Rtp":
|
||||||
|
@ -150,32 +150,32 @@ func main() {
|
||||||
config.Packetisation = Flv
|
config.Packetisation = Flv
|
||||||
}
|
}
|
||||||
|
|
||||||
switch configFlags[quantisationModePtr] {
|
switch *configFlags[quantisationModePtr] {
|
||||||
case "QuantizationOn":
|
case "QuantizationOn":
|
||||||
config.Quantization = QuantizationOn
|
config.Quantization = QuantizationOn
|
||||||
case "QuantizationOff":
|
case "QuantizationOff":
|
||||||
config.Quantization = QuantizationOff
|
config.Quantization = QuantizationOff
|
||||||
}
|
}
|
||||||
|
|
||||||
switch configFlags[verbosityPtr] {
|
switch *configFlags[verbosityPtr] {
|
||||||
case "No":
|
case "No":
|
||||||
config.Verbosity = No
|
config.Verbosity = No
|
||||||
case "Yes":
|
case "Yes":
|
||||||
config.Verbosity = Yes
|
config.Verbosity = Yes
|
||||||
}
|
}
|
||||||
|
|
||||||
config.FramesPerClip = configFlags[framesPerClipPtr]
|
config.FramesPerClip = *configFlags[framesPerClipPtr]
|
||||||
config.RtmpUrl = configFlags[rtmpUrlPtr]
|
config.RtmpUrl = *configFlags[rtmpUrlPtr]
|
||||||
config.Bitrate = configFlags[bitratePtr]
|
config.Bitrate = *configFlags[bitratePtr]
|
||||||
config.OutputFileName = configFlags[outputFileNamePtr]
|
config.OutputFileName = *configFlags[outputFileNamePtr]
|
||||||
config.InputFileName = configFlags[inputFileNamePtr]
|
config.InputFileName = *configFlags[inputFileNamePtr]
|
||||||
config.Height = configFlags[heightPtr]
|
config.Height = *configFlags[heightPtr]
|
||||||
config.Width = configFlags[widthPtr]
|
config.Width = *configFlags[widthPtr]
|
||||||
config.FrameRate = configFlags[frameRatePtr]
|
config.FrameRate = *configFlags[frameRatePtr]
|
||||||
config.HttpAddress = configFlags[httpAddressPtr]
|
config.HttpAddress = *configFlags[httpAddressPtr]
|
||||||
config.Quantization = configFlags[quantisationPtr]
|
config.Quantization = *configFlags[quantisationPtr]
|
||||||
config.Timeout = configFlags[timeoutPtr]
|
config.Timeout = *configFlags[timeoutPtr]
|
||||||
config.IntraRefreshPeriod = configFlags[intraRefreshPeriodPtr]
|
config.IntraRefreshPeriod = *configFlags[intraRefreshPeriodPtr]
|
||||||
|
|
||||||
createRevidInstance()
|
createRevidInstance()
|
||||||
revidInst.Start()
|
revidInst.Start()
|
||||||
|
|
Loading…
Reference in New Issue