Bug 1318833 - Part 3: Remove unused Silverlight checks from Decoder Doctor. r=gerald

This commit is contained in:
Chris Peterson 2016-11-21 21:11:04 -08:00
Родитель df18772e96
Коммит fc2e7c9a1f
3 изменённых файлов: 11 добавлений и 41 удалений

Просмотреть файл

@ -124,7 +124,7 @@ MediaLoadSourceMediaNotMatched=Specified “media” attribute of “%1$S” doe
MediaLoadUnsupportedMimeType=HTTP “Content-Type” of “%1$S” is not supported. Load of media resource %2$S failed.
# LOCALIZATION NOTE: %S is the URL of the media resource which failed to load because of error in decoding.
MediaLoadDecodeError=Media resource %S could not be decoded.
MediaWidevineNoWMFNoSilverlight=Trying to play Widevine with no Windows Media Foundation (nor Silverlight fallback), see https://support.mozilla.org/kb/fix-video-audio-problems-firefox-windows
MediaWidevineNoWMF=Trying to play Widevine with no Windows Media Foundation. See https://support.mozilla.org/kb/fix-video-audio-problems-firefox-windows
# LOCALIZATION NOTE: %S is a comma-separated list of codecs (e.g. 'video/mp4, video/webm')
MediaWMFNeeded=To play video formats %S, you need to install extra Microsoft software, see https://support.mozilla.org/kb/fix-video-audio-problems-firefox-windows
# LOCALIZATION NOTE: %S is a comma-separated list of codecs (e.g. 'video/mp4, video/webm')

Просмотреть файл

@ -250,9 +250,9 @@ DecoderDoctorDocumentWatcher::EnsureTimerIsStarted()
}
}
static const NotificationAndReportStringId sMediaWidevineNoWMFNoSilverlight =
static const NotificationAndReportStringId sMediaWidevineNoWMF=
{ dom::DecoderDoctorNotificationType::Platform_decoder_not_found,
"MediaWidevineNoWMFNoSilverlight" };
"MediaWidevineNoWMF" };
static const NotificationAndReportStringId sMediaWMFNeeded =
{ dom::DecoderDoctorNotificationType::Platform_decoder_not_found,
"MediaWMFNeeded" };
@ -275,10 +275,10 @@ static const NotificationAndReportStringId sUnsupportedLibavcodec =
{ dom::DecoderDoctorNotificationType::Unsupported_libavcodec,
"MediaUnsupportedLibavcodec" };
static const NotificationAndReportStringId*
static const NotificationAndReportStringId *const
sAllNotificationsAndReportStringIds[] =
{
&sMediaWidevineNoWMFNoSilverlight,
&sMediaWidevineNoWMF,
&sMediaWMFNeeded,
&sMediaUnsupportedBeforeWindowsVista,
&sMediaPlatformDecoderNotFound,
@ -375,33 +375,6 @@ ReportAnalysis(nsIDocument* aDocument,
}
}
enum SilverlightPresence {
eNoSilverlight,
eSilverlightDisabled,
eSilverlightEnabled
};
static SilverlightPresence
CheckSilverlight()
{
MOZ_ASSERT(NS_IsMainThread());
RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
if (!pluginHost) {
return eNoSilverlight;
}
nsTArray<nsCOMPtr<nsIInternalPluginTag>> plugins;
pluginHost->GetPlugins(plugins, /*aIncludeDisabled*/ true);
for (const auto& plugin : plugins) {
for (const auto& mime : plugin->MimeTypes()) {
if (mime.LowerCaseEqualsLiteral("application/x-silverlight")
|| mime.LowerCaseEqualsLiteral("application/x-silverlight-2")) {
return plugin->IsEnabled() ? eSilverlightEnabled : eSilverlightDisabled;
}
}
}
return eNoSilverlight;
}
static nsString
CleanItemForFormatsList(const nsAString& aItem)
{
@ -554,14 +527,11 @@ DecoderDoctorDocumentWatcher::SynthesizeAnalysis()
// No supported key systems!
switch (lastKeySystemIssue) {
case DecoderDoctorDiagnostics::eWidevineWithNoWMF:
if (CheckSilverlight() != eSilverlightEnabled) {
DD_INFO("DecoderDoctorDocumentWatcher[%p, doc=%p]::SynthesizeAnalysis() - unsupported key systems: %s, widevine without WMF nor Silverlight",
this, mDocument, NS_ConvertUTF16toUTF8(unsupportedKeySystems).get());
ReportAnalysis(mDocument, sMediaWidevineNoWMFNoSilverlight,
false, unsupportedKeySystems);
return;
}
break;
DD_INFO("DecoderDoctorDocumentWatcher[%p, doc=%p]::SynthesizeAnalysis() - unsupported key systems: %s, Widevine without WMF",
this, mDocument, NS_ConvertUTF16toUTF8(unsupportedKeySystems).get());
ReportAnalysis(mDocument, sMediaWidevineNoWMF, false,
unsupportedKeySystems);
return;
default:
break;
}

Просмотреть файл

@ -401,7 +401,7 @@ pref("media.gmp.storage.version.expected", 1);
// Filter what triggers user notifications.
// See DecoderDoctorDocumentWatcher::ReportAnalysis for details.
pref("media.decoder-doctor.notifications-allowed", "MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight,MediaCannotInitializePulseAudio,MediaCannotPlayNoDecoders,MediaUnsupportedLibavcodec");
pref("media.decoder-doctor.notifications-allowed", "MediaWMFNeeded,MediaWidevineNoWMF,MediaCannotInitializePulseAudio,MediaCannotPlayNoDecoders,MediaUnsupportedLibavcodec");
// Whether we report partial failures.
pref("media.decoder-doctor.verbose", false);
// Whether DD should consider WMF-disabled a WMF failure, useful for testing.