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 {
|
for outNo, outType := range r.config.Outputs {
|
||||||
switch outType {
|
switch outType {
|
||||||
case File:
|
case File:
|
||||||
|
@ -218,19 +218,19 @@ func (r *Revid) reset(config Config) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
r.destination[outNo] = s
|
r.destination = append(r.destination, s)
|
||||||
case FfmpegRtmp:
|
case FfmpegRtmp:
|
||||||
s, err := newFfmpegSender(config.RtmpUrl, fmt.Sprint(r.config.FrameRate))
|
s, err := newFfmpegSender(config.RtmpUrl, fmt.Sprint(r.config.FrameRate))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
r.destination[outNo] = s
|
r.destination = append(r.destination, s)
|
||||||
case Rtmp:
|
case Rtmp:
|
||||||
s, err := newRtmpSender(config.RtmpUrl, rtmpConnectionTimeout, rtmpConnectionMaxTries, r.config.Logger.Log)
|
s, err := newRtmpSender(config.RtmpUrl, rtmpConnectionTimeout, rtmpConnectionMaxTries, r.config.Logger.Log)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
r.destination[outNo] = s
|
r.destination = append(r.destination, s)
|
||||||
case Http:
|
case Http:
|
||||||
r.destination[outNo] = newHttpSender(r.ns, r.config.Logger.Log)
|
r.destination[outNo] = newHttpSender(r.ns, r.config.Logger.Log)
|
||||||
case Udp:
|
case Udp:
|
||||||
|
@ -238,7 +238,7 @@ func (r *Revid) reset(config Config) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
r.destination[outNo] = s
|
r.destination = append(r.destination, s)
|
||||||
case Rtp:
|
case Rtp:
|
||||||
r.rtpSender, err = newRtpSender(r.config.RtpAddress, r.config.Logger.Log, r.config.FrameRate)
|
r.rtpSender, err = newRtpSender(r.config.RtpAddress, r.config.Logger.Log, r.config.FrameRate)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue