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
57151829
Commit
57151829
authored
May 01, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix TotalLost value in receiver reports.
parent
100f72e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
client.go
client.go
+2
-2
group.go
group.go
+1
-1
packetcache/packetcache.go
packetcache/packetcache.go
+5
-2
No files found.
client.go
View file @
57151829
...
...
@@ -395,7 +395,7 @@ func sendRR(c *client, conn *upConnection) error {
reports
:=
make
([]
rtcp
.
ReceptionReport
,
0
,
len
(
conn
.
tracks
))
for
_
,
t
:=
range
conn
.
tracks
{
expected
,
lost
,
eseqno
:=
t
.
cache
.
GetStats
(
true
)
expected
,
lost
,
totalLost
,
eseqno
:=
t
.
cache
.
GetStats
(
true
)
if
expected
==
0
{
expected
=
1
}
...
...
@@ -406,7 +406,7 @@ func sendRR(c *client, conn *upConnection) error {
SSRC
:
t
.
track
.
SSRC
(),
LastSenderReport
:
atomic
.
LoadUint32
(
&
t
.
lastSenderReport
),
FractionLost
:
uint8
((
lost
*
256
)
/
expected
),
TotalLost
:
l
ost
,
TotalLost
:
totalL
ost
,
LastSequenceNumber
:
eseqno
,
})
}
...
...
group.go
View file @
57151829
...
...
@@ -698,7 +698,7 @@ func getClientStats(c *client) clientStats {
for
_
,
up
:=
range
c
.
up
{
conns
:=
connStats
{
id
:
up
.
id
}
for
_
,
t
:=
range
up
.
tracks
{
expected
,
lost
,
_
:=
t
.
cache
.
GetStats
(
false
)
expected
,
lost
,
_
,
_
:=
t
.
cache
.
GetStats
(
false
)
if
expected
==
0
{
expected
=
1
}
...
...
packetcache/packetcache.go
View file @
57151829
...
...
@@ -20,6 +20,7 @@ type Cache struct {
lastValid
bool
expected
uint32
lost
uint32
totalLost
uint32
// bitmap
first
uint16
bitmap
uint32
...
...
@@ -151,17 +152,19 @@ func (cache *Cache) BitmapGet() (uint16, uint16) {
return
first
,
bitmap
}
func
(
cache
*
Cache
)
GetStats
(
reset
bool
)
(
uint32
,
uint32
,
uint32
)
{
func
(
cache
*
Cache
)
GetStats
(
reset
bool
)
(
uint32
,
uint32
,
uint32
,
uint32
)
{
cache
.
mu
.
Lock
()
defer
cache
.
mu
.
Unlock
()
expected
:=
cache
.
expected
lost
:=
cache
.
lost
totalLost
:=
cache
.
totalLost
+
cache
.
lost
eseqno
:=
uint32
(
cache
.
cycle
)
<<
16
|
uint32
(
cache
.
last
)
if
reset
{
cache
.
expected
=
0
cache
.
totalLost
+=
cache
.
lost
cache
.
lost
=
0
}
return
expected
,
lost
,
eseqno
return
expected
,
lost
,
totalLost
,
eseqno
}
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