Browse Source

update gortsplib

pull/340/head
aler9 5 years ago
parent
commit
ce316115fa
  1. 4
      go.mod
  2. 4
      go.sum
  3. 7
      internal/clientrtsp/client.go
  4. 4
      main_clientrtsp_test.go
  5. 4
      main_sourcertsp_test.go

4
go.mod

@ -5,11 +5,11 @@ go 1.15 @@ -5,11 +5,11 @@ go 1.15
require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
github.com/aler9/gortsplib v0.0.0-20210320202503-3defa7074839
github.com/aler9/gortsplib v0.0.0-20210321101935-437b4cc87e5e
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.4.9
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/notedit/rtmp v0.0.0
github.com/notedit/rtmp v0.0.2
github.com/pion/rtp v1.6.2
github.com/stretchr/testify v1.6.1
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad

4
go.sum

@ -2,8 +2,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafo @@ -2,8 +2,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafo
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/aler9/gortsplib v0.0.0-20210320202503-3defa7074839 h1:o9h0vJiX/65HrYoOKuEGhfY8ZWrzrkaB2Pp5KUvUNL8=
github.com/aler9/gortsplib v0.0.0-20210320202503-3defa7074839/go.mod h1:aj4kDzanb3JZ46sFywWShcsnqqXTLE/3PNjwDhQZGM0=
github.com/aler9/gortsplib v0.0.0-20210321101935-437b4cc87e5e h1:z2vLKNQPL46LEVR7hzkh6p1m54r/dGJeVdfz8NKeRnE=
github.com/aler9/gortsplib v0.0.0-20210321101935-437b4cc87e5e/go.mod h1:6YS0c1vRrFFYj4gjKbgB8ntd/o1XqK/c0KaHX/PtnhU=
github.com/aler9/rtmp v0.0.0-20210309202041-2d7177b7300d h1:LAX8pNvYpGgFpKdbPpEZWjNkHbmyvjMrT3vO7s7aaKU=
github.com/aler9/rtmp v0.0.0-20210309202041-2d7177b7300d/go.mod h1:vzuE21rowz+lT1NGsWbreIvYulgBpCGnQyeTyFblUHc=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=

7
internal/clientrtsp/client.go

@ -14,6 +14,7 @@ import ( @@ -14,6 +14,7 @@ import (
"github.com/aler9/gortsplib/pkg/auth"
"github.com/aler9/gortsplib/pkg/base"
"github.com/aler9/gortsplib/pkg/headers"
"github.com/aler9/gortsplib/pkg/liberrors"
"github.com/pion/rtp"
"github.com/aler9/rtsp-simple-server/internal/client"
@ -436,8 +437,10 @@ func (c *Client) run() { @@ -436,8 +437,10 @@ func (c *Client) run() {
case err := <-readDone:
c.conn.Close()
if err != io.EOF && err != gortsplib.ErrServerTeardown && err != errTerminated {
c.log(logger.Info, "ERR: %s", err)
if err != io.EOF && err != errTerminated {
if _, ok := err.(liberrors.ErrServerTeardown); !ok {
c.log(logger.Info, "ERR: %s", err)
}
}
switch c.conn.State() {

4
main_clientrtsp_test.go

@ -867,7 +867,7 @@ wait @@ -867,7 +867,7 @@ wait
v := headers.TransportModePlay
return &v
}(),
InterleavedIds: &[2]int{0, 1},
InterleavedIDs: &[2]int{0, 1},
}.Write(),
},
}.Write(bconn.Writer)
@ -919,7 +919,7 @@ wait @@ -919,7 +919,7 @@ wait
v := headers.TransportModePlay
return &v
}(),
InterleavedIds: &[2]int{0, 1},
InterleavedIDs: &[2]int{0, 1},
}.Write(),
},
}.Write(bconn.Writer)

4
main_sourcertsp_test.go

@ -186,7 +186,7 @@ func TestSourceRTSPRTPInfo(t *testing.T) { @@ -186,7 +186,7 @@ func TestSourceRTSPRTPInfo(t *testing.T) {
return &v
}(),
ClientPorts: th.ClientPorts,
InterleavedIds: &[2]int{0, 1},
InterleavedIDs: &[2]int{0, 1},
}.Write(),
},
}.Write(bconn.Writer)
@ -209,7 +209,7 @@ func TestSourceRTSPRTPInfo(t *testing.T) { @@ -209,7 +209,7 @@ func TestSourceRTSPRTPInfo(t *testing.T) {
return &v
}(),
ClientPorts: th.ClientPorts,
InterleavedIds: &[2]int{2, 3},
InterleavedIDs: &[2]int{2, 3},
}.Write(),
},
}.Write(bconn.Writer)

Loading…
Cancel
Save