Log high jitter case (#2602)

This commit is contained in:
cnderrauber
2024-03-28 15:59:03 +08:00
committed by GitHub
parent 45581433cc
commit bc5fc17bdc
+5 -1
View File
@@ -59,6 +59,8 @@ type PlayoutDelayController struct {
logger logger.Logger
rtpStats *buffer.RTPStatsSender
snapshotID uint32
highDelayCount atomic.Uint32
}
func NewPlayoutDelayController(minDelay, maxDelay uint32, logger logger.Logger, rtpStats *buffer.RTPStatsSender) (*PlayoutDelayController, error) {
@@ -113,7 +115,9 @@ func (c *PlayoutDelayController) SetJitter(jitter uint32) {
return
}
if targetDelay > targetDelayLogThreshold {
c.logger.Debugw("high playout delay", "target", targetDelay, "jitter", jitter, "nackPercent", nackPercent, "current", c.currentDelay)
if c.highDelayCount.Add(1)%100 == 1 {
c.logger.Infow("high playout delay", "target", targetDelay, "jitter", jitter, "nackPercent", nackPercent, "current", c.currentDelay)
}
}
c.currentDelay = targetDelay
c.lock.Unlock()