mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35:58 +01:00
Parse receiver reports, save loss rate.
This commit is contained in:
parent
b042bed9a3
commit
17941fa96d
2 changed files with 9 additions and 0 deletions
|
@ -616,6 +616,14 @@ func rtcpDownListener(g *group, conn *downConnection, track *downTrack, s *webrt
|
||||||
uint64(ms),
|
uint64(ms),
|
||||||
)
|
)
|
||||||
case *rtcp.ReceiverReport:
|
case *rtcp.ReceiverReport:
|
||||||
|
for _, r := range p.Reports {
|
||||||
|
if r.SSRC == track.track.SSRC() {
|
||||||
|
atomic.StoreUint32(
|
||||||
|
&track.loss,
|
||||||
|
uint32(r.FractionLost),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
case *rtcp.TransportLayerNack:
|
case *rtcp.TransportLayerNack:
|
||||||
sendRecovery(p, track)
|
sendRecovery(p, track)
|
||||||
default:
|
default:
|
||||||
|
|
1
group.go
1
group.go
|
@ -75,6 +75,7 @@ type downTrack struct {
|
||||||
remote *upTrack
|
remote *upTrack
|
||||||
isMuted uint32
|
isMuted uint32
|
||||||
maxBitrate *timeStampedBitrate
|
maxBitrate *timeStampedBitrate
|
||||||
|
loss uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *downTrack) muted() bool {
|
func (t *downTrack) muted() bool {
|
||||||
|
|
Loading…
Reference in a new issue