Closed Bug 1238433 Opened 8 years ago Closed 8 years ago

Add telemetry to report proportion of frame drops during video playback

Categories

(Core :: Audio/Video: Playback, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: cpearce, Assigned: lchristie)

Details

Attachments

(1 file, 3 obsolete files)

We should add telemetry to report the proportion of frames that are dropped during playback of video. Then we can observe this fluctuating over time to figure out if we're improving performance.

I suggest that we do this in the same place that we report the MSE telemetry.

We already have the playback quality statistics returned by HTMLVideoElement::GetVideoPlaybackQuality(), it's just a matter of determining whether our media element is playing a video, and if so getting a video element pointer and calling its GetVideoPlaybackQuality function and reporting the results.

You can convert from an HTMLMediaElement to an HTMLVideoElement by calling HTMLVideoElement::FromContentOrNull(this) from inside an HTMLMediaElement function I believe, for example (but not from inside HTMLMediaElement): http://mxr.mozilla.org/mozilla-central/source/layout/base/nsLayoutUtils.cpp#7192
Priority: -- → P2
Attached patch bug-1238433-fix.patch (obsolete) — Splinter Review
Attachment #8718196 - Flags: review?(cpearce)
Attachment #8718196 - Flags: feedback?(benjamin)
Attached patch bug-1238433-fix.patch (obsolete) — Splinter Review
Attachment #8718196 - Attachment is obsolete: true
Attachment #8718196 - Flags: review?(cpearce)
Attachment #8718196 - Flags: feedback?(benjamin)
Attachment #8718198 - Flags: review?(cpearce)
Attachment #8718198 - Flags: feedback?(benjamin)
Comment on attachment 8718198 [details] [diff] [review]
bug-1238433-fix.patch

Review of attachment 8718198 [details] [diff] [review]:
-----------------------------------------------------------------

I think this is a good start. We'll want more precise telemetry which reports frame drops for different resolutions and formats and values of hardware accelerated video decoding. But this is a good aggregate to start.

::: toolkit/components/telemetry/Histograms.json
@@ +10167,5 @@
> +    "alert_emails": ["lchristie@mozilla.com", "cpearce@mozilla.com"],
> +    "expires_in_version": "55",
> +    "kind": "linear",
> +    "high": "100",
> +    "n_buckets": 20,

I think you need "n_buckets": "101", as we want higher precision than just 5% increments, and in order to record both values 0 and 100% you need to include the range [0,1...100], i.e. 101 values.
Attachment #8718198 - Flags: review?(cpearce) → review+
Attached patch bug-1238433-fix.patch (obsolete) — Splinter Review
Amended with cpearce's comments
Attachment #8718198 - Attachment is obsolete: true
Attachment #8718198 - Flags: feedback?(benjamin)
Attachment #8718512 - Flags: feedback?(benjamin)
Comment on attachment 8718512 [details] [diff] [review]
bug-1238433-fix.patch

Seems pretty straightforward. You'll probably want correlates in another iteration (video size/frame rate in particular), but good to start with the simple thing.
Attachment #8718512 - Flags: feedback?(benjamin) → feedback+
Keywords: checkin-needed
Whoops, didn't upload the version in the last try push.
Flags: needinfo?(lchristie)
Attachment #8718512 - Attachment is obsolete: true
Keywords: checkin-needed
Keywords: checkin-needed
Will follow up with more detailed telemetry in bug 1249706
https://hg.mozilla.org/mozilla-central/rev/cc4950c828a1
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: