mirror of https://bitbucket.org/ausocean/av.git
Fixing revidcli
This commit is contained in:
parent
16d925af08
commit
36169f0142
15
RevidCLI.go
15
RevidCLI.go
|
@ -63,7 +63,7 @@ const (
|
||||||
quantizationPtr = 16
|
quantizationPtr = 16
|
||||||
timeoutPtr = 17
|
timeoutPtr = 17
|
||||||
intraRefreshPeriodPtr = 18
|
intraRefreshPeriodPtr = 18
|
||||||
rotatePtr = 19
|
flipPtr = 19
|
||||||
)
|
)
|
||||||
|
|
||||||
// Other misc consts
|
// Other misc consts
|
||||||
|
@ -119,7 +119,7 @@ func main() {
|
||||||
{"Quantization", "Desired quantization value"},
|
{"Quantization", "Desired quantization value"},
|
||||||
{"Timeout", "Http timeout in seconds"},
|
{"Timeout", "Http timeout in seconds"},
|
||||||
{"IntraRefreshPeriod", "The IntraRefreshPeriod i.e. how many keyframes we send"},
|
{"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
|
// Create the configFlags based on the flagNames array
|
||||||
|
@ -211,6 +211,16 @@ func main() {
|
||||||
fmt.Println("Bad verbosity argument!")
|
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.FramesPerClip = *configFlags[framesPerClipPtr]
|
||||||
config.RtmpUrl = *configFlags[rtmpUrlPtr]
|
config.RtmpUrl = *configFlags[rtmpUrlPtr]
|
||||||
config.Bitrate = *configFlags[bitratePtr]
|
config.Bitrate = *configFlags[bitratePtr]
|
||||||
|
@ -223,7 +233,6 @@ func main() {
|
||||||
config.Quantization = *configFlags[quantizationPtr]
|
config.Quantization = *configFlags[quantizationPtr]
|
||||||
config.Timeout = *configFlags[timeoutPtr]
|
config.Timeout = *configFlags[timeoutPtr]
|
||||||
config.IntraRefreshPeriod = *configFlags[intraRefreshPeriodPtr]
|
config.IntraRefreshPeriod = *configFlags[intraRefreshPeriodPtr]
|
||||||
config.Rotate = *configFlags[rotatePtr]
|
|
||||||
|
|
||||||
// Also give the config a logger object
|
// Also give the config a logger object
|
||||||
config.Logger = smartLogger.New(loggerVerbosity, smartLogger.White)
|
config.Logger = smartLogger.New(loggerVerbosity, smartLogger.White)
|
||||||
|
|
Loading…
Reference in New Issue