mirror of https://bitbucket.org/ausocean/av.git
exp/rvcl: adding default config param consts and changing flag name
This commit is contained in:
parent
a4a409b4f5
commit
528dfe29e4
|
@ -96,6 +96,16 @@ const (
|
|||
fMode = 0777
|
||||
)
|
||||
|
||||
// Default config parameters.
|
||||
const (
|
||||
defaultInput = "File"
|
||||
defaultInputPath = "../../../test/test-data/av/input/betterInput.h264"
|
||||
defaultFileFPS = "25"
|
||||
defaultOutput = "RTP"
|
||||
defaultRTPAddress = "localhost:6970"
|
||||
defaultLoop = "true"
|
||||
)
|
||||
|
||||
// canProfile is set to false with revid-cli is built with "-tags profile".
|
||||
var canProfile = false
|
||||
|
||||
|
@ -150,7 +160,7 @@ func main() {
|
|||
var (
|
||||
configPtr = flag.String("config", "", "Provide configuration JSON to revid (see readme for further information).")
|
||||
configFilePtr = flag.String("config-file", "", "Location of revid configuration file (see readme for further information).")
|
||||
rtpAddrPtr = flag.String("addr", "localhost:6970", "RTP destination address (<ip>:<port>)(common port=6970)")
|
||||
rtpAddrPtr = flag.String("rtp-addr", defaultRTPAddress, "RTP destination address (<ip>:<port>)(common port=6970)")
|
||||
)
|
||||
flag.Parse()
|
||||
|
||||
|
@ -185,12 +195,12 @@ func main() {
|
|||
// No config information has been provided; provide a default config map.
|
||||
default:
|
||||
cfg = map[string]string{
|
||||
"Input": "File",
|
||||
"InputPath": "../../../test/test-data/av/input/betterInput.h264",
|
||||
"FileFPS": "25",
|
||||
"Output": "RTP",
|
||||
"Input": defaultInput,
|
||||
"InputPath": defaultInputPath,
|
||||
"FileFPS": defaultFileFPS,
|
||||
"Output": defaultOutput,
|
||||
"RTPAddress": *rtpAddrPtr,
|
||||
"Loop": "true",
|
||||
"Loop": defaultLoop,
|
||||
}
|
||||
}
|
||||
log.Info("got config", "config", cfg)
|
||||
|
|
Loading…
Reference in New Issue