mirror of
https://github.com/bluenviron/mediamtx
synced 2024-12-15 19:24:55 +00:00
support RTP-Info headers with paths instead of URLs (#250)
This commit is contained in:
parent
64cf3a4181
commit
69be41d997
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ 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-20210328132003-213eb4908e9a
|
||||
github.com/aler9/gortsplib v0.0.0-20210329200014-d39996c82445
|
||||
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
|
||||
|
4
go.sum
4
go.sum
@ -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-20210328132003-213eb4908e9a h1:Sc6oUtwMUJrPOIaMIOq3TjZhjYIPtGnkAJiftjvpmvw=
|
||||
github.com/aler9/gortsplib v0.0.0-20210328132003-213eb4908e9a/go.mod h1:zVCg+TQX445hh1pC5QgAuuBvvXZMWLY1XYz626dGFqY=
|
||||
github.com/aler9/gortsplib v0.0.0-20210329200014-d39996c82445 h1:HulTLAWhDfvTBrRD/xxcD+8J3PImuykBCA2U62ZDUMU=
|
||||
github.com/aler9/gortsplib v0.0.0-20210329200014-d39996c82445/go.mod h1:zVCg+TQX445hh1pC5QgAuuBvvXZMWLY1XYz626dGFqY=
|
||||
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=
|
||||
|
@ -350,7 +350,7 @@ func (c *Client) run() {
|
||||
lsn := ti.LastSequenceNumber
|
||||
|
||||
ri = append(ri, &headers.RTPInfoEntry{
|
||||
URL: u,
|
||||
URL: u.String(),
|
||||
SequenceNumber: &lsn,
|
||||
Timestamp: &ts,
|
||||
})
|
||||
|
@ -236,20 +236,20 @@ func TestClientRTMPRTPInfo(t *testing.T) {
|
||||
|
||||
require.Equal(t, &headers.RTPInfo{
|
||||
&headers.RTPInfoEntry{
|
||||
URL: &base.URL{
|
||||
URL: (&base.URL{
|
||||
Scheme: "rtsp",
|
||||
Host: ownDockerIP + ":8554",
|
||||
Path: "/teststream/trackID=0",
|
||||
},
|
||||
}).String(),
|
||||
SequenceNumber: (*dest.RTPInfo())[0].SequenceNumber,
|
||||
Timestamp: (*dest.RTPInfo())[0].Timestamp,
|
||||
},
|
||||
&headers.RTPInfoEntry{
|
||||
URL: &base.URL{
|
||||
URL: (&base.URL{
|
||||
Scheme: "rtsp",
|
||||
Host: ownDockerIP + ":8554",
|
||||
Path: "/teststream/trackID=1",
|
||||
},
|
||||
}).String(),
|
||||
SequenceNumber: (*dest.RTPInfo())[1].SequenceNumber,
|
||||
Timestamp: (*dest.RTPInfo())[1].Timestamp,
|
||||
},
|
||||
|
@ -665,11 +665,11 @@ func TestClientRTSPRTPInfo(t *testing.T) {
|
||||
|
||||
require.Equal(t, &headers.RTPInfo{
|
||||
&headers.RTPInfoEntry{
|
||||
URL: &base.URL{
|
||||
URL: (&base.URL{
|
||||
Scheme: "rtsp",
|
||||
Host: ownDockerIP + ":8554",
|
||||
Path: "/teststream/trackID=0",
|
||||
},
|
||||
}).String(),
|
||||
SequenceNumber: func() *uint16 {
|
||||
v := uint16(556)
|
||||
return &v
|
||||
@ -703,11 +703,11 @@ func TestClientRTSPRTPInfo(t *testing.T) {
|
||||
|
||||
require.Equal(t, &headers.RTPInfo{
|
||||
&headers.RTPInfoEntry{
|
||||
URL: &base.URL{
|
||||
URL: (&base.URL{
|
||||
Scheme: "rtsp",
|
||||
Host: ownDockerIP + ":8554",
|
||||
Path: "/teststream/trackID=0",
|
||||
},
|
||||
}).String(),
|
||||
SequenceNumber: func() *uint16 {
|
||||
v := uint16(556)
|
||||
return &v
|
||||
@ -715,11 +715,11 @@ func TestClientRTSPRTPInfo(t *testing.T) {
|
||||
Timestamp: (*dest.RTPInfo())[0].Timestamp,
|
||||
},
|
||||
&headers.RTPInfoEntry{
|
||||
URL: &base.URL{
|
||||
URL: (&base.URL{
|
||||
Scheme: "rtsp",
|
||||
Host: ownDockerIP + ":8554",
|
||||
Path: "/teststream/trackID=1",
|
||||
},
|
||||
}).String(),
|
||||
SequenceNumber: func() *uint16 {
|
||||
v := uint16(87)
|
||||
return &v
|
||||
|
@ -92,11 +92,11 @@ func TestSourceRTMPRTPInfo(t *testing.T) {
|
||||
|
||||
require.Equal(t, &headers.RTPInfo{
|
||||
&headers.RTPInfoEntry{
|
||||
URL: &base.URL{
|
||||
URL: (&base.URL{
|
||||
Scheme: "rtsp",
|
||||
Host: "127.0.1.2:8554",
|
||||
Path: "/proxied/trackID=0",
|
||||
},
|
||||
}).String(),
|
||||
SequenceNumber: (*dest.RTPInfo())[0].SequenceNumber,
|
||||
Timestamp: (*dest.RTPInfo())[0].Timestamp,
|
||||
},
|
||||
|
@ -296,11 +296,11 @@ func TestSourceRTSPRTPInfo(t *testing.T) {
|
||||
|
||||
require.Equal(t, &headers.RTPInfo{
|
||||
&headers.RTPInfoEntry{
|
||||
URL: &base.URL{
|
||||
URL: (&base.URL{
|
||||
Scheme: "rtsp",
|
||||
Host: "127.0.1.2:8554",
|
||||
Path: "/proxied/trackID=0",
|
||||
},
|
||||
}).String(),
|
||||
SequenceNumber: func() *uint16 {
|
||||
v := uint16(87)
|
||||
return &v
|
||||
@ -308,11 +308,11 @@ func TestSourceRTSPRTPInfo(t *testing.T) {
|
||||
Timestamp: (*dest.RTPInfo())[0].Timestamp,
|
||||
},
|
||||
&headers.RTPInfoEntry{
|
||||
URL: &base.URL{
|
||||
URL: (&base.URL{
|
||||
Scheme: "rtsp",
|
||||
Host: "127.0.1.2:8554",
|
||||
Path: "/proxied/trackID=1",
|
||||
},
|
||||
}).String(),
|
||||
SequenceNumber: func() *uint16 {
|
||||
v := uint16(34254)
|
||||
return &v
|
||||
|
Loading…
Reference in New Issue
Block a user