mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 22:05:39 +00:00
Give more cache for RTX. (#3438)
- With probing the packet rate can get high suddenly and remote may not have sent receiver report as it might be sending for the non-spikey rate. That causes metadata cache overflows. So, give RTX more cahe. - Don't need a large cache for primary as either reports come in regularly (or they are missing for a long time and having a biger cache is not the solution for that, so reduce primary cache size) - Check for receiver report falling exactly back by (1 << 16). Had done that change in the inside for loop, but missed the top level check :-(
This commit is contained in:
@@ -377,7 +377,7 @@ func NewDownTrack(params DowntrackParams) (*DownTrack, error) {
|
||||
|
||||
var mdCacheSize, mdCacheSizeRTX int
|
||||
if d.kind == webrtc.RTPCodecTypeVideo {
|
||||
mdCacheSize, mdCacheSizeRTX = 32768, 4096
|
||||
mdCacheSize, mdCacheSizeRTX = 8192, 8192
|
||||
} else {
|
||||
mdCacheSize, mdCacheSizeRTX = 8192, 1024
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ func (r *RTPStatsSender) UpdateFromReceiverReport(rr rtcp.ReceptionReport) (rtt
|
||||
}
|
||||
|
||||
extReceivedRRSN := extHighestSNFromRR + (r.extStartSN & 0xFFFF_FFFF_FFFF_0000)
|
||||
if r.extHighestSNFromRR != extHighestSNFromRR && int64(r.extHighestSN-extReceivedRRSN) > (1<<16) {
|
||||
if r.extHighestSNFromRR != extHighestSNFromRR && int64(r.extHighestSN-extReceivedRRSN) >= (1<<16) {
|
||||
// there are cases where remote does not send RTCP Receiver Report for extended periods of time,
|
||||
// some times several minutes, in that interval the sequence number rolls over,
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user