Browse Source

Merge pull request #1 from gwuhaolin/master

sync
pull/137/head
Matthew 5 years ago committed by GitHub
parent
commit
a3cb4c622b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      protocol/httpflv/writer.go
  2. 1
      protocol/rtmp/rtmp.go
  3. 7
      protocol/rtmp/rtmprelay/rtmprelay.go
  4. 1
      test.go

2
protocol/httpflv/writer.go

@ -154,8 +154,6 @@ func (flvWriter *FLVWriter) SendPacket() error { @@ -154,8 +154,6 @@ func (flvWriter *FLVWriter) SendPacket() error {
}
}
return nil
}
func (flvWriter *FLVWriter) Wait() {

1
protocol/rtmp/rtmp.go

@ -329,7 +329,6 @@ func (v *VirWriter) SendPacket() error { @@ -329,7 +329,6 @@ func (v *VirWriter) SendPacket() error {
}
}
return nil
}
func (v *VirWriter) Info() (ret av.Info) {

7
protocol/rtmp/rtmprelay/rtmprelay.go

@ -3,6 +3,7 @@ package rtmprelay @@ -3,6 +3,7 @@ package rtmprelay
import (
"bytes"
"fmt"
"github.com/gwuhaolin/livego/av"
"io"
"github.com/gwuhaolin/livego/protocol/amf"
@ -85,21 +86,21 @@ func (self *RtmpRelay) sendPublishChunkStream() { @@ -85,21 +86,21 @@ func (self *RtmpRelay) sendPublishChunkStream() {
func (self *RtmpRelay) Start() error {
if self.startflag {
return fmt.Errorf("The rtmprelay already started, playurl=%s, publishurl=%s", self.PlayUrl, self.PublishUrl)
return fmt.Errorf("The rtmprelay already started, playurl=%s, publishurl=%s\n", self.PlayUrl, self.PublishUrl)
}
self.connectPlayClient = core.NewConnClient()
self.connectPublishClient = core.NewConnClient()
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 {
log.Debugf("connectPlayClient.Start url=%v error", self.PlayUrl)
return err
}
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 {
log.Debugf("connectPublishClient.Start url=%v error", self.PublishUrl)
self.connectPlayClient.Close(nil)

1
test.go

@ -0,0 +1 @@ @@ -0,0 +1 @@
package main
Loading…
Cancel
Save