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
77b2e6e1
Commit
77b2e6e1
authored
Apr 28, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass a track to the RTCP listener.
parent
4b854e3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
client.go
client.go
+5
-5
No files found.
client.go
View file @
77b2e6e1
...
@@ -481,7 +481,7 @@ func addDownTrack(c *client, id string, remoteTrack *upTrack, remoteConn *upConn
...
@@ -481,7 +481,7 @@ func addDownTrack(c *client, id string, remoteTrack *upTrack, remoteConn *upConn
conn
.
tracks
=
append
(
conn
.
tracks
,
track
)
conn
.
tracks
=
append
(
conn
.
tracks
,
track
)
remoteTrack
.
addLocal
(
track
)
remoteTrack
.
addLocal
(
track
)
go
rtcpListener
(
c
.
group
,
conn
,
s
,
track
.
maxBitrate
)
go
rtcpListener
(
c
.
group
,
conn
,
track
,
s
)
return
conn
,
s
,
nil
return
conn
,
s
,
nil
}
}
...
@@ -492,7 +492,7 @@ func msSinceEpoch() uint64 {
...
@@ -492,7 +492,7 @@ func msSinceEpoch() uint64 {
return
uint64
(
time
.
Since
(
epoch
)
/
time
.
Millisecond
)
return
uint64
(
time
.
Since
(
epoch
)
/
time
.
Millisecond
)
}
}
func
rtcpListener
(
g
*
group
,
c
*
downConnection
,
s
*
webrtc
.
RTPSender
,
bitrate
*
timeStampedBitrate
)
{
func
rtcpListener
(
g
*
group
,
c
onn
*
downConnection
,
track
*
downTrack
,
s
*
webrtc
.
RTPSender
)
{
for
{
for
{
ps
,
err
:=
s
.
ReadRTCP
()
ps
,
err
:=
s
.
ReadRTCP
()
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -505,7 +505,7 @@ func rtcpListener(g *group, c *downConnection, s *webrtc.RTPSender, bitrate *tim
...
@@ -505,7 +505,7 @@ func rtcpListener(g *group, c *downConnection, s *webrtc.RTPSender, bitrate *tim
for
_
,
p
:=
range
ps
{
for
_
,
p
:=
range
ps
{
switch
p
:=
p
.
(
type
)
{
switch
p
:=
p
.
(
type
)
{
case
*
rtcp
.
PictureLossIndication
:
case
*
rtcp
.
PictureLossIndication
:
err
:=
sendPLI
(
c
.
remote
.
pc
,
p
.
MediaSSRC
)
err
:=
sendPLI
(
c
onn
.
remote
.
pc
,
p
.
MediaSSRC
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"sendPLI: %v"
,
err
)
log
.
Printf
(
"sendPLI: %v"
,
err
)
}
}
...
@@ -515,11 +515,11 @@ func rtcpListener(g *group, c *downConnection, s *webrtc.RTPSender, bitrate *tim
...
@@ -515,11 +515,11 @@ func rtcpListener(g *group, c *downConnection, s *webrtc.RTPSender, bitrate *tim
// data between the two writes. This shouldn't
// data between the two writes. This shouldn't
// matter, we'll recover at the next sample.
// matter, we'll recover at the next sample.
atomic
.
StoreUint64
(
atomic
.
StoreUint64
(
&
b
itrate
.
bitrate
,
&
track
.
maxB
itrate
.
bitrate
,
p
.
Bitrate
,
p
.
Bitrate
,
)
)
atomic
.
StoreUint64
(
atomic
.
StoreUint64
(
&
b
itrate
.
timestamp
,
&
track
.
maxB
itrate
.
timestamp
,
uint64
(
ms
),
uint64
(
ms
),
)
)
case
*
rtcp
.
ReceiverReport
:
case
*
rtcp
.
ReceiverReport
:
...
...
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