1
Fork 0

Increase receiver report timeout.

This commit is contained in:
Juliusz Chroboczek 2021-01-21 21:19:07 +01:00
parent f0dcd0b1d9
commit fb17778ba6
1 changed files with 2 additions and 2 deletions

View File

@ -53,6 +53,8 @@ func (s *receiverStats) Set(loss uint8, jitter uint32, now uint64) {
atomic.StoreUint64(&s.jiffies, now) atomic.StoreUint64(&s.jiffies, now)
} }
const receiverReportTimeout = 30 * rtptime.JiffiesPerSec
func (s *receiverStats) Get(now uint64) (uint8, uint32) { func (s *receiverStats) Get(now uint64) (uint8, uint32) {
ts := atomic.LoadUint64(&s.jiffies) ts := atomic.LoadUint64(&s.jiffies)
if now < ts || now > ts+receiverReportTimeout { if now < ts || now > ts+receiverReportTimeout {
@ -61,8 +63,6 @@ func (s *receiverStats) Get(now uint64) (uint8, uint32) {
return uint8(atomic.LoadUint32(&s.loss)), atomic.LoadUint32(&s.jitter) return uint8(atomic.LoadUint32(&s.loss)), atomic.LoadUint32(&s.jitter)
} }
const receiverReportTimeout = 8 * rtptime.JiffiesPerSec
type iceConnection interface { type iceConnection interface {
addICECandidate(candidate *webrtc.ICECandidateInit) error addICECandidate(candidate *webrtc.ICECandidateInit) error
flushICECandidates() error flushICECandidates() error