Bug 1376636 - Exempt AV1 decoding from the vp9 benchmark. r=gerald

Accept av1 video in the webm decoder even when we've determined
the machine is too slow for software vp9 decoding. While we're
at an experimental stage with this codec, poor performance is
preferable to not being able to see a demo at all.

MozReview-Commit-ID: 6DJHCPfXHlA

--HG--
extra : rebase_source : 0819c3ddd437e9e56b18ba1fc6c56d4bdaebfa77
This commit is contained in:
Ralph Giles 2017-06-27 17:20:00 -07:00
parent db31c1b4a1
commit 892c70acff

View File

@ -6,6 +6,9 @@
#include "MediaSource.h" #include "MediaSource.h"
#if MOZ_AV1
#include "AOMDecoder.h"
#endif
#include "AsyncEventRunner.h" #include "AsyncEventRunner.h"
#include "DecoderTraits.h" #include "DecoderTraits.h"
#include "Benchmark.h" #include "Benchmark.h"
@ -118,6 +121,9 @@ MediaSource::IsTypeSupported(const nsAString& aType, DecoderDoctorDiagnostics* a
if (!(Preferences::GetBool("media.mediasource.webm.enabled", false) || if (!(Preferences::GetBool("media.mediasource.webm.enabled", false) ||
containerType->ExtendedType().Codecs().Contains( containerType->ExtendedType().Codecs().Contains(
NS_LITERAL_STRING("vp8")) || NS_LITERAL_STRING("vp8")) ||
// FIXME: Temporary comparison with the full codecs attribute.
// See bug 1377015.
AOMDecoder::IsSupportedCodec(containerType->ExtendedType().Codecs().AsString()) ||
IsWebMForced(aDiagnostics))) { IsWebMForced(aDiagnostics))) {
return NS_ERROR_DOM_NOT_SUPPORTED_ERR; return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
} }