Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sfu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alain Takoudjou
sfu
Commits
120bfc92
Commit
120bfc92
authored
Dec 03, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade pion/rtcp, use nack.Range instead of PacketList.
parent
f0cbe9c0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
10 deletions
+12
-10
go.mod
go.mod
+1
-1
go.sum
go.sum
+2
-0
packetcache/packetcache_test.go
packetcache/packetcache_test.go
+3
-4
rtpconn/rtpconn.go
rtpconn/rtpconn.go
+6
-5
No files found.
go.mod
View file @
120bfc92
...
@@ -6,7 +6,7 @@ require (
...
@@ -6,7 +6,7 @@ require (
github.com/at-wat/ebml-go v0.11.0
github.com/at-wat/ebml-go v0.11.0
github.com/gorilla/websocket v1.4.2
github.com/gorilla/websocket v1.4.2
github.com/pion/ice/v2 v2.0.7
github.com/pion/ice/v2 v2.0.7
github.com/pion/rtcp v1.2.
4
github.com/pion/rtcp v1.2.
5
github.com/pion/rtp v1.6.1
github.com/pion/rtp v1.6.1
github.com/pion/webrtc/v3 v3.0.0-beta.7
github.com/pion/webrtc/v3 v3.0.0-beta.7
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
...
...
go.sum
View file @
120bfc92
...
@@ -124,6 +124,8 @@ github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
...
@@ -124,6 +124,8 @@ github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
github.com/pion/rtcp v1.2.4 h1:NT3H5LkUGgaEapvp0HGik+a+CpflRF7KTD7H+o7OWIM=
github.com/pion/rtcp v1.2.4 h1:NT3H5LkUGgaEapvp0HGik+a+CpflRF7KTD7H+o7OWIM=
github.com/pion/rtcp v1.2.4/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
github.com/pion/rtcp v1.2.4/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
github.com/pion/rtcp v1.2.5 h1:CbZu6JujwnFUkvpJHh/0ypzKla45KX3nPnvXBe4P0hQ=
github.com/pion/rtcp v1.2.5/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
github.com/pion/rtp v1.6.1 h1:2Y2elcVBrahYnHKN2X7rMHX/r1R4TEBMP1LaVu/wNhk=
github.com/pion/rtp v1.6.1 h1:2Y2elcVBrahYnHKN2X7rMHX/r1R4TEBMP1LaVu/wNhk=
github.com/pion/rtp v1.6.1/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
github.com/pion/rtp v1.6.1/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
github.com/pion/sctp v1.7.10/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0=
github.com/pion/sctp v1.7.10/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0=
...
...
packetcache/packetcache_test.go
View file @
120bfc92
...
@@ -350,15 +350,14 @@ func TestBitmapPacket(t *testing.T) {
...
@@ -350,15 +350,14 @@ func TestBitmapPacket(t *testing.T) {
}
}
p
:=
rtcp
.
NackPair
{
first
,
rtcp
.
PacketBitmap
(
bitmap
)}
p
:=
rtcp
.
NackPair
{
first
,
rtcp
.
PacketBitmap
(
bitmap
)}
pl
:=
p
.
PacketList
()
p
.
Range
(
func
(
s
uint16
)
bool
{
for
_
,
s
:=
range
pl
{
if
s
<
42
||
s
>=
42
+
64
{
if
s
<
42
||
s
>=
42
+
64
{
if
(
value
&
(
1
<<
(
s
-
42
)))
!=
0
{
if
(
value
&
(
1
<<
(
s
-
42
)))
!=
0
{
t
.
Errorf
(
"Bit %v unexpectedly set"
,
s
-
42
)
t
.
Errorf
(
"Bit %v unexpectedly set"
,
s
-
42
)
}
}
}
}
}
return
true
})
}
}
func
BenchmarkCachePutGet
(
b
*
testing
.
B
)
{
func
BenchmarkCachePutGet
(
b
*
testing
.
B
)
{
...
...
rtpconn/rtpconn.go
View file @
120bfc92
...
@@ -573,23 +573,24 @@ func gotNACK(conn *rtpDownConnection, track *rtpDownTrack, p *rtcp.TransportLaye
...
@@ -573,23 +573,24 @@ func gotNACK(conn *rtpDownConnection, track *rtpDownTrack, p *rtcp.TransportLaye
var
packet
rtp
.
Packet
var
packet
rtp
.
Packet
buf
:=
make
([]
byte
,
packetcache
.
BufSize
)
buf
:=
make
([]
byte
,
packetcache
.
BufSize
)
for
_
,
nack
:=
range
p
.
Nacks
{
for
_
,
nack
:=
range
p
.
Nacks
{
for
_
,
seqno
:=
range
nack
.
PacketList
()
{
nack
.
Range
(
func
(
seqno
uint16
)
bool
{
l
:=
track
.
remote
.
GetRTP
(
seqno
,
buf
)
l
:=
track
.
remote
.
GetRTP
(
seqno
,
buf
)
if
l
==
0
{
if
l
==
0
{
unhandled
=
append
(
unhandled
,
seqno
)
unhandled
=
append
(
unhandled
,
seqno
)
contin
ue
return
tr
ue
}
}
err
:=
packet
.
Unmarshal
(
buf
[
:
l
])
err
:=
packet
.
Unmarshal
(
buf
[
:
l
])
if
err
!=
nil
{
if
err
!=
nil
{
contin
ue
return
tr
ue
}
}
err
=
track
.
track
.
WriteRTP
(
&
packet
)
err
=
track
.
track
.
WriteRTP
(
&
packet
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"WriteRTP: %v"
,
err
)
log
.
Printf
(
"WriteRTP: %v"
,
err
)
continu
e
return
fals
e
}
}
track
.
rate
.
Accumulate
(
uint32
(
l
))
track
.
rate
.
Accumulate
(
uint32
(
l
))
}
return
true
})
}
}
if
len
(
unhandled
)
==
0
{
if
len
(
unhandled
)
==
0
{
return
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment