Log some information around high forwarding latency. (#3944)

* Log some information around high forwarding latency.

Latency is not 0 after switching to microseconds resolution.
But, still seeing high jitter. Logging a bit more to understand under
what conditions it happens.

More notes inline.

* compact
This commit is contained in:
Raja Subramanian
2025-09-23 12:37:09 +05:30
committed by GitHub
parent 6a41fae548
commit 408492e030
2 changed files with 36 additions and 18 deletions
+7 -1
View File
@@ -827,7 +827,13 @@ func (w *WebRTCReceiver) forwardRTP(layer int32, buff *buffer.Buffer) {
// track delay/jitter
if writeCount > 0 && w.forwardStats != nil {
w.forwardStats.Update(pkt.Arrival, mono.UnixNano())
if latency, isHigh := w.forwardStats.Update(pkt.Arrival, mono.UnixNano()); isHigh {
w.logger.Infow(
"high forwarding latency",
"latency", latency,
"writeCount", writeCount,
)
}
}
// track video layers