Closed Bug 1652598 Opened 5 years ago Closed 5 years ago

Log status code in error when CDM fails to decode

Categories

(Core :: Audio/Video: Playback, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: bryce, Assigned: bryce)

Details

Attachments

(2 files)

If the CDM fails to decode data we will receive a message from it indicating a failed decode[0]. This message contains an numerical value corresponding to an enum in the CDM headers. We should surface this on the error we return to help debug issues. This is useful in various cases:

  • Web devs have a status code they can give to us in cases they catch errors we surface.
  • The code will show up in the profiler now that we log these errors
    • This helps make user profiles more useful
    • This helps devs more quickly discover the error via the profiler rather than needing to debug and/or enable logs

[0] https://searchfox.org/mozilla-central/rev/89814940895946b48b4c04c702efd2c676ec8e7e/dom/media/gmp/ChromiumCDMParent.cpp#850
[1] https://searchfox.org/mozilla-central/rev/89814940895946b48b4c04c702efd2c676ec8e7e/dom/media/MediaDecoderStateMachine.cpp#3471

Also add a log for when decoding fails. We typically log on any unhappy return
values from the CDM, so it makes sense we should also do so when a decode fails.

  • Add a helper to log cdm::Status as a string to improve error reporting.
  • Fix up format strings in ChromiumCDMParent to use PRIu32 instead of u for logs
    where it's appropriate.

Depends on D83419

Pushed by bvandyk@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/909c7df4e04b Add status code to MediaError when CDM decode fails. r=alwu https://hg.mozilla.org/integration/autoland/rev/3a2adb2b3c4b Add helpers to log CDM status as string. r=alwu
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: