On Windows XP (and others before Vista), if WMF is required to play a format,
the console message should not refer to Microsoft software as it is not
available there.
MozReview-Commit-ID: LaERcaOfePe
--HG--
extra : rebase_source : 72b6e24683be4eb2c21c9ccff039f326cf5647a7
To determine if an issue has been solved, go through the possible prefs that
would have been saved by the front-end, to see if any previously-unplayable
formats/key systems are now playable, in which case we notify the frontend, to
record the issue-solved telemetry.
MozReview-Commit-ID: DmU50i6FtG8
Combine notification type and web-console string id into structs, simpler to
pass around, and will be useful to go through them when checking for solved
issues.
MozReview-Commit-ID: Hy3bMG3m12V
Renamed AppendToStringList to AppendToFormatsList, to distinguish from other
string-based lists.
Ensure that list items don't contain commas, as commas are used as separators,
and we don't want&need to introduce escaping.
Added FormatsListContains.
MozReview-Commit-ID: 8KpuhSjCW3d
Utility class&function that creates an iteratable range from a comma-separated
string, where each iteration will give a dependent substring (i.e., no string
copy happening).
This will help with going through lists of unplayable formats, to see if
issues have been solved.
If useful enough, this could later be published to a more public location
(e.g. mfbt or xpcom).
MozReview-Commit-ID: 3XP5PwQZFA1
Fill up extra details in notification: Web-console notification string id (will
be used as telemetry key), and whether the issue is present or has been solved.
MozReview-Commit-ID: AzhuIvGqb2p
This helps determine how each format is affected by some issues. It will be
needed in later patches, to see when the issue get fixed (by noticing that
these formats become playable again).
MozReview-Commit-ID: 2wFzmnX5rBY
Instead of having yet-another variable, just infer playability from the lists
of playable&unplayable formats, which we need to look at anyway.
MozReview-Commit-ID: ABc2WtWADzN
Pref "media.decoder-doctor.notifications-allowed" defines which notifications
may be forwarded to the front-end (based on the web-console message ID for
that situation). This allows fine-grained filtering.
The current default is to only notify the user about Widevine requests when WMF
and Silverlight are missing (because Widevine does not include an AAC decoder).
MozReview-Commit-ID: KPFH5XjuwnZ
Analyze the diagnostics information gathered so far, and dispatch
notifications as appropriate.
The most important case in this bug is when Widevine is requested but WMF and
Silverlight are missing.
The generic case of WMF missing (when needed to play) is there too.
Note: Currently no notifications are actually sent to the front-end by default,
the following patch will add filtering to allow/prevent targeted notifications.
MozReview-Commit-ID: EB9PKrMgKSr
Record diagnostics information about whether the GMP CDM failed to load
(though currently impossible!), and which GMP is used in the current media
format check.
MozReview-Commit-ID: 4B8kDTAiV6b
Media Key System access requests are now recorded with their success/failure,
as well as accompanying issues of importance.
In this bug we focus on the Widevine-with-no-WMF case.
MozReview-Commit-ID: ElBN6cXKwAW
Some refactoring, clean-ups, etc.
The main change is that the can-play status is passed when diagnostics are
finally recorded. This will help when introducing different types of
diagnostics in future patches (e.g., Key System issues).
MozReview-Commit-ID: 182ePlrMqn4
If the FFmpeg decoder module cannot be started, the failure is recorded in the
DecoderDoctorDiagnostics structure.
In this case, on Linux if there are no suitable decoders for any requested
format, a "platform decoder not found" notification is sent to Chrome (a
separate bug will implement the actual front-end notification), and logged to
the web console.
Note: All front-end notifications (that could display a notification bar) are
currently disabled by default. Set the following pref to true to enable them:
"media.decoderdoctor.enable-notification-bar".
MozReview-Commit-ID: CdaX7QUdWtd
If the Decoder Doctor analysis needs to report something, a notification
is sent to listeners of "decoder-doctor-notification", with data identifying
the type of notification along with the media format(s) that could not be
decoded.
In this patch, there are only two notification types: "cannot-play", or
"can-play-but-some-missing-decoders" (if pref "media.decoderdoctor.verbose" is
true).
In a future bug, the Firefox front-end will handle this notification and then
optionally display a user notification.
Note: "can-play-but-some-missing-decoders" should be useful to help implement
the front-end side (as sites like YouTube will probably have some formats we
don't handle); it may be removed later on if it has no further use.
MozReview-Commit-ID: GL3JRqLxzxL
Minimal implementation of DecoderDoctorDiagnostics.
If the Decoder Doctor analysis needs to report something, a notification is
logged to the web console, with the media format(s) that cannot be decoded.
In this patch, there are only two notification types: "Cannot play" when no
decoders are found for any of the requested formats), or "Can play" (if pref
"media.decoderdoctor.verbose" is true) when decoders are missing for only
some of the requested formats.
MozReview-Commit-ID: 4QkiVvcNSU3