mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 02:12:44 +00:00
stats for pli and bitrate (#487)
* stats for pli and bitrate * solve comments * return 0 if no pli sent
This commit is contained in:
1 parent
e5ffd38054
commit
608da4ba4b
11 files changed
+282
-4
No files matched your search
@@ -321,6 +321,10 @@ func (b *Buffer) SetRTT(rtt uint32) {
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Buffer) LastPLI() int64 {
|
||||
return b.lastPli
|
||||
}
|
||||
|
||||
func (b *Buffer) calc(pkt []byte, arrivalTime int64) {
|
||||
isRTX := false
|
||||
|
||||
@@ -638,6 +642,7 @@ func (b *Buffer) buildReceptionReport() *rtcp.ReceptionReport {
|
||||
packetsLost: b.stats.TotalPacketsLost,
|
||||
lastLossRate: lossRate,
|
||||
}
|
||||
b.stats.LostRate = lossRate
|
||||
|
||||
return &rtcp.ReceptionReport{
|
||||
SSRC: b.mediaSSRC,
|
||||
|
||||
Reference in new issue
Block a user