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
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue