summaryrefslogtreecommitdiffstats
path: root/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-15 22:10:46 -0500
committertrav90 <travawine@palemoon.org>2018-10-15 22:10:46 -0500
commit3e0443e4c1ea6612d722c3a5b38843e0da451e81 (patch)
tree8106968f06da1bd85ca01f63cd2dbee32aaa6260 /dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
parent9aea199da0312640208f3c0a6d47951fb9975984 (diff)
downloadUXP-3e0443e4c1ea6612d722c3a5b38843e0da451e81.tar
UXP-3e0443e4c1ea6612d722c3a5b38843e0da451e81.tar.gz
UXP-3e0443e4c1ea6612d722c3a5b38843e0da451e81.tar.lz
UXP-3e0443e4c1ea6612d722c3a5b38843e0da451e81.tar.xz
UXP-3e0443e4c1ea6612d722c3a5b38843e0da451e81.zip
Add AOMDecoder to AgnosticDecoderModule
Diffstat (limited to 'dom/media/platforms/agnostic/AgnosticDecoderModule.cpp')
-rw-r--r--dom/media/platforms/agnostic/AgnosticDecoderModule.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp b/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
index 7bd75b7fe..4d4a90bd4 100644
--- a/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
@@ -12,6 +12,10 @@
#include "WAVDecoder.h"
#include "TheoraDecoder.h"
+#ifdef MOZ_AV1
+#include "AOMDecoder.h"
+#endif
+
namespace mozilla {
bool
@@ -20,6 +24,9 @@ AgnosticDecoderModule::SupportsMimeType(const nsACString& aMimeType,
{
bool supports =
VPXDecoder::IsVPX(aMimeType) ||
+#ifdef MOZ_AV1
+ AOMDecoder::IsAV1(aMimeType) ||
+#endif
OpusDataDecoder::IsOpus(aMimeType) ||
VorbisDataDecoder::IsVorbis(aMimeType) ||
WaveDataDecoder::IsWave(aMimeType) ||
@@ -36,7 +43,13 @@ AgnosticDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams)
if (VPXDecoder::IsVPX(aParams.mConfig.mMimeType)) {
m = new VPXDecoder(aParams);
- } else if (TheoraDecoder::IsTheora(aParams.mConfig.mMimeType)) {
+ }
+#ifdef MOZ_AV1
+ else if (AOMDecoder::IsAV1(aParams.mConfig.mMimeType)) {
+ m = new AOMDecoder(aParams);
+ }
+#endif
+ else if (TheoraDecoder::IsTheora(aParams.mConfig.mMimeType)) {
m = new TheoraDecoder(aParams);
}