Browse Source

规范性小改动

pull/121/head
mask-pp 5 years ago
parent
commit
2de43144ce
  1. 5
      protocol/rtmp/rtmprelay/rtmprelay.go

5
protocol/rtmp/rtmprelay/rtmprelay.go

@ -3,6 +3,7 @@ package rtmprelay
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"github.com/gwuhaolin/livego/av"
"io" "io"
"github.com/gwuhaolin/livego/protocol/amf" "github.com/gwuhaolin/livego/protocol/amf"
@ -92,14 +93,14 @@ func (self *RtmpRelay) Start() error {
self.connectPublishClient = core.NewConnClient() self.connectPublishClient = core.NewConnClient()
log.Debugf("play server addr:%v starting....", self.PlayUrl) log.Debugf("play server addr:%v starting....", self.PlayUrl)
err := self.connectPlayClient.Start(self.PlayUrl, "play") err := self.connectPlayClient.Start(self.PlayUrl, av.PLAY)
if err != nil { if err != nil {
log.Debugf("connectPlayClient.Start url=%v error", self.PlayUrl) log.Debugf("connectPlayClient.Start url=%v error", self.PlayUrl)
return err return err
} }
log.Debugf("publish server addr:%v starting....", self.PublishUrl) log.Debugf("publish server addr:%v starting....", self.PublishUrl)
err = self.connectPublishClient.Start(self.PublishUrl, "publish") err = self.connectPublishClient.Start(self.PublishUrl, av.PUBLISH)
if err != nil { if err != nil {
log.Debugf("connectPublishClient.Start url=%v error", self.PublishUrl) log.Debugf("connectPublishClient.Start url=%v error", self.PublishUrl)
self.connectPlayClient.Close(nil) self.connectPlayClient.Close(nil)

Loading…
Cancel
Save