mirror of https://bitbucket.org/ausocean/av.git
rtmp: rename StartSession to Open
This commit is contained in:
parent
05c6c376b4
commit
5bdd66e22b
|
@ -223,7 +223,7 @@ func newRtmpSender(url string, timeout uint, retries int, log func(lvl, msg stri
|
||||||
var err error
|
var err error
|
||||||
for n := 0; n < retries; n++ {
|
for n := 0; n < retries; n++ {
|
||||||
sess = rtmp.NewSession(url, timeout)
|
sess = rtmp.NewSession(url, timeout)
|
||||||
err = sess.StartSession()
|
err = sess.Open()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ func (s *rtmpSender) restart() error {
|
||||||
}
|
}
|
||||||
for n := 0; n < s.retries; n++ {
|
for n := 0; n < s.retries; n++ {
|
||||||
s.sess = rtmp.NewSession(s.url, s.timeout)
|
s.sess = rtmp.NewSession(s.url, s.timeout)
|
||||||
err = s.sess.StartSession()
|
err = s.sess.Open()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ import (
|
||||||
|
|
||||||
// Session provides an interface for sending flv tags over rtmp.
|
// Session provides an interface for sending flv tags over rtmp.
|
||||||
type Session interface {
|
type Session interface {
|
||||||
StartSession() error
|
Open() error
|
||||||
Write([]byte) (int, error)
|
Write([]byte) (int, error)
|
||||||
Close() error
|
Close() error
|
||||||
}
|
}
|
||||||
|
@ -71,9 +71,9 @@ func NewSession(url string, connectTimeout uint) Session {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartSession establishes an rtmp connection with the url passed into the
|
// Open establishes an rtmp connection with the url passed into the
|
||||||
// constructor
|
// constructor
|
||||||
func (s *session) StartSession() error {
|
func (s *session) Open() error {
|
||||||
if s.rtmp != nil {
|
if s.rtmp != nil {
|
||||||
return errors.New("rtmp: attempt to start already running session")
|
return errors.New("rtmp: attempt to start already running session")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue