Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
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
nexedi
galene
Commits
78d3b7ab
Commit
78d3b7ab
authored
Apr 26, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify sendPLI.
We use identical SSRC values on both sides, no need to map.
parent
c86b1c87
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
17 deletions
+5
-17
client.go
client.go
+5
-17
No files found.
client.go
View file @
78d3b7ab
...
@@ -460,9 +460,9 @@ func rtcpListener(g *group, c *downConnection, s *webrtc.RTPSender) {
...
@@ -460,9 +460,9 @@ func rtcpListener(g *group, c *downConnection, s *webrtc.RTPSender) {
for
_
,
p
:=
range
ps
{
for
_
,
p
:=
range
ps
{
switch
p
:=
p
.
(
type
)
{
switch
p
:=
p
.
(
type
)
{
case
*
rtcp
.
PictureLossIndication
:
case
*
rtcp
.
PictureLossIndication
:
err
:=
sendP
li
(
g
,
s
.
Track
(),
c
.
remote
)
err
:=
sendP
LI
(
c
.
remote
,
p
.
MediaSSRC
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"sendP
li
: %v"
,
err
)
log
.
Printf
(
"sendP
LI
: %v"
,
err
)
}
}
case
*
rtcp
.
ReceiverEstimatedMaximumBitrate
:
case
*
rtcp
.
ReceiverEstimatedMaximumBitrate
:
bitrate
:=
uint32
(
math
.
MaxInt32
)
bitrate
:=
uint32
(
math
.
MaxInt32
)
...
@@ -549,22 +549,10 @@ func updateBitrate(g *group, up *upConnection) (uint32, uint32) {
...
@@ -549,22 +549,10 @@ func updateBitrate(g *group, up *upConnection) (uint32, uint32) {
return
audio
,
video
return
audio
,
video
}
}
func
sendPli
(
g
*
group
,
local
*
webrtc
.
Track
,
up
*
upConnection
)
error
{
func
sendPLI
(
up
*
upConnection
,
ssrc
uint32
)
error
{
var
track
*
webrtc
.
Track
// we use equal SSRC values on both sides
for
_
,
p
:=
range
up
.
pairs
{
if
p
.
local
==
local
{
track
=
p
.
remote
break
}
}
if
track
==
nil
{
return
errors
.
New
(
"attempted to send PLI for unknown track"
)
}
return
up
.
pc
.
WriteRTCP
([]
rtcp
.
Packet
{
return
up
.
pc
.
WriteRTCP
([]
rtcp
.
Packet
{
&
rtcp
.
PictureLossIndication
{
MediaSSRC
:
track
.
SSRC
()
},
&
rtcp
.
PictureLossIndication
{
MediaSSRC
:
ssrc
},
})
})
}
}
...
...
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