mirror of https://bitbucket.org/ausocean/av.git
revid: honour difference between rtmp dst and others
This commit is contained in:
parent
92ba9c89a2
commit
071e6fd0f7
|
@ -210,7 +210,7 @@ func (r *Revid) reset(config Config) error {
|
|||
}
|
||||
}
|
||||
|
||||
r.destination = make([]loadSender, len(r.config.Outputs))
|
||||
r.destination = r.destination[:0]
|
||||
for outNo, outType := range r.config.Outputs {
|
||||
switch outType {
|
||||
case File:
|
||||
|
@ -218,19 +218,19 @@ func (r *Revid) reset(config Config) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r.destination[outNo] = s
|
||||
r.destination = append(r.destination, s)
|
||||
case FfmpegRtmp:
|
||||
s, err := newFfmpegSender(config.RtmpUrl, fmt.Sprint(r.config.FrameRate))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r.destination[outNo] = s
|
||||
r.destination = append(r.destination, s)
|
||||
case Rtmp:
|
||||
s, err := newRtmpSender(config.RtmpUrl, rtmpConnectionTimeout, rtmpConnectionMaxTries, r.config.Logger.Log)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r.destination[outNo] = s
|
||||
r.destination = append(r.destination, s)
|
||||
case Http:
|
||||
r.destination[outNo] = newHttpSender(r.ns, r.config.Logger.Log)
|
||||
case Udp:
|
||||
|
@ -238,7 +238,7 @@ func (r *Revid) reset(config Config) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r.destination[outNo] = s
|
||||
r.destination = append(r.destination, s)
|
||||
case Rtp:
|
||||
r.rtpSender, err = newRtpSender(r.config.RtpAddress, r.config.Logger.Log, r.config.FrameRate)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue