[webrtc-stats] Align inter-frame delay metrics with pause/freeze metrics by measuring at render time, not decode time (#716)

henbos has just created a new issue for https://github.com/w3c/webrtc-stats:

== Align inter-frame delay metrics with pause/freeze metrics by measuring at render time, not decode time ==
The inter-frame delay metrics are used to calculate the harmonic frame rate.

Historically, inter-frame delay had both an "at decode" and "at render" implementation in webrtc, but today's "at decode" are the only ones that exist because they are the one in the spec. But this proved to be an issue, because the harmonic fps at decode time is not closest to what the user experiences.

We already have "at render" metrics pauseCount/totalPausesDuration and freezeCount/totalFreezesDuration. We should make the inter-frame delay metrics align as was originally intended to also be "at render".

To resolve this issue:
1. Update totalInterFrameDelay and totalSquaredInterFrameDelay to talk be updated when a frame is rendered, not when it is decoded.
2. Add a framesRendered counter, since the harmonic fps is calculated using a frame counter, and frame rendering happens later than frame decoding.

Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/716 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 13 December 2022 10:37:29 UTC