Bug 212938

Summary: [WebRTC] Add support for freeze/pause receiver stats
Product: WebKit Reporter: charob
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Major CC: cdumez, eric.carlson, esprehn+autocc, ews-watchlist, glenn, hta, jer.noble, kondapallykalyan, philipj, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: iPhone / iPad   
OS: iOS 13   
Attachments:
Description Flags
Patch none

charob
Reported 2020-06-08 16:27:06 PDT
Please refer to: https://w3c.github.io/webrtc-provisional-stats/#dom-rtcvideoreceiverstats WebRTC can expose some video rendered statistics such as: 1- freezeCount: Count the total number of video freezes experienced by this receiver. It is a freeze if frame duration, which is time interval between two consecutively rendered frames, is equal or exceeds Max(3 * avg_frame_duration_ms, avg_frame_duration_ms + 150), where avg_frame_duration_ms is linear average of durations of last 30 rendered frames. 2- pauseCount: Count the total number of video pauses experienced by this receiver. Video is considered to be paused if time passed since last received packet exceeds 5 seconds. 3- totalFreezesDuration: Total duration of rendered frames which are considered as frozen (for definition of freeze see freezeCount), in seconds. This value is updated when a frame is rendered. 4- totalPausesDuration: Total duration of pauses (for definition of pause see pauseCount), in seconds. This value is updated when a frame is rendered. 5- totalFramesDuration: Total duration of all rendered video frames, in seconds. This value is updated when a frame is rendered. 6- sumOfSquaredFramesDuration: Sum of squared duration of all rendered frames. It can be used to calculate harmonic frame rate: totalFramesDuration / sumOfSquaredFrameDurations This value is updated when a frame is rendered. And ultimately it would be optimal to have a frameRate stat available as well.
Attachments
Patch (6.51 KB, patch)
2020-06-22 06:42 PDT, youenn fablet
no flags
Radar WebKit Bug Importer
Comment 1 2020-06-08 17:06:29 PDT
youenn fablet
Comment 2 2020-06-22 06:31:18 PDT
As a first step towards that approach, we can expose those as part of 'track' stats.
youenn fablet
Comment 3 2020-06-22 06:40:06 PDT
https://bugs.webkit.org/show_bug.cgi?id=213458 will track 'receiver' stats support, to align with the spec.
youenn fablet
Comment 4 2020-06-22 06:42:40 PDT
EWS
Comment 5 2020-06-22 09:15:12 PDT
Committed r263351: <https://trac.webkit.org/changeset/263351> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402466 [details].
Note You need to log in before you can comment on or make changes to this bug.