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
|
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".
|
// canProfile is set to false with revid-cli is built with "-tags profile".
|
||||||
var canProfile = false
|
var canProfile = false
|
||||||
|
|
||||||
|
@ -150,7 +160,7 @@ func main() {
|
||||||
var (
|
var (
|
||||||
configPtr = flag.String("config", "", "Provide configuration JSON to revid (see readme for further information).")
|
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).")
|
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()
|
flag.Parse()
|
||||||
|
|
||||||
|
@ -185,12 +195,12 @@ func main() {
|
||||||
// No config information has been provided; provide a default config map.
|
// No config information has been provided; provide a default config map.
|
||||||
default:
|
default:
|
||||||
cfg = map[string]string{
|
cfg = map[string]string{
|
||||||
"Input": "File",
|
"Input": defaultInput,
|
||||||
"InputPath": "../../../test/test-data/av/input/betterInput.h264",
|
"InputPath": defaultInputPath,
|
||||||
"FileFPS": "25",
|
"FileFPS": defaultFileFPS,
|
||||||
"Output": "RTP",
|
"Output": defaultOutput,
|
||||||
"RTPAddress": *rtpAddrPtr,
|
"RTPAddress": *rtpAddrPtr,
|
||||||
"Loop": "true",
|
"Loop": defaultLoop,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Info("got config", "config", cfg)
|
log.Info("got config", "config", cfg)
|
||||||
|
|
Loading…
Reference in New Issue