mirror of https://bitbucket.org/ausocean/av.git
Merged in revid-output-var (pull request #312)
revid: Output var Approved-by: Saxon Milton <saxon.milton@gmail.com>
This commit is contained in:
commit
edcb8090ff
|
@ -292,6 +292,7 @@ var TypeData = map[string]string{
|
|||
"MTSRBSize": "int",
|
||||
"MTSRBWriteTimeout": "int",
|
||||
"OutputPath": "string",
|
||||
"Output": "enum:File,Http,Rtmp,Rtp",
|
||||
"Outputs": "string",
|
||||
"Quantization": "uint",
|
||||
"Rotation": "uint",
|
||||
|
|
|
@ -523,7 +523,7 @@ func (r *Revid) Update(vars map[string]string) error {
|
|||
default:
|
||||
r.cfg.Logger.Log(logger.Warning, pkg+"invalid InputCodec variable value", "value", value)
|
||||
}
|
||||
case "Output":
|
||||
case "Outputs":
|
||||
outputs := strings.Split(value, ",")
|
||||
r.cfg.Outputs = make([]uint8, len(outputs))
|
||||
|
||||
|
@ -538,10 +538,25 @@ func (r *Revid) Update(vars map[string]string) error {
|
|||
case "Rtp":
|
||||
r.cfg.Outputs[i] = config.OutputRTP
|
||||
default:
|
||||
r.cfg.Logger.Log(logger.Warning, pkg+"invalid output param", "value", value)
|
||||
r.cfg.Logger.Log(logger.Warning, pkg+"invalid outputs param", "value", value)
|
||||
continue
|
||||
}
|
||||
}
|
||||
case "Output":
|
||||
r.cfg.Outputs = make([]uint8, 1)
|
||||
switch value {
|
||||
case "File":
|
||||
r.cfg.Outputs[0] = config.OutputFile
|
||||
case "Http":
|
||||
r.cfg.Outputs[0] = config.OutputHTTP
|
||||
case "Rtmp":
|
||||
r.cfg.Outputs[0] = config.OutputRTMP
|
||||
case "Rtp":
|
||||
r.cfg.Outputs[0] = config.OutputRTP
|
||||
default:
|
||||
r.cfg.Logger.Log(logger.Warning, pkg+"invalid output param", "value", value)
|
||||
continue
|
||||
}
|
||||
|
||||
case "RtmpUrl":
|
||||
r.cfg.RTMPURL = value
|
||||
|
|
Loading…
Reference in New Issue