using values pointed at by pointers, instead of using pointers :S

This commit is contained in:
Saxon1 2018-04-19 17:44:38 +09:30
parent bf5a2075bb
commit 2b025b82aa
1 changed files with 19 additions and 19 deletions

View File

@ -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()