mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-27 17:47:34 +09:00
Add AOMDecoder to AgnosticDecoderModule
This commit is contained in:
parent
19743f8e4d
commit
349a05d4ad
1 changed files with 14 additions and 1 deletions
|
|
@ -12,6 +12,10 @@
|
||||||
#include "WAVDecoder.h"
|
#include "WAVDecoder.h"
|
||||||
#include "TheoraDecoder.h"
|
#include "TheoraDecoder.h"
|
||||||
|
|
||||||
|
#ifdef MOZ_AV1
|
||||||
|
#include "AOMDecoder.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -20,6 +24,9 @@ AgnosticDecoderModule::SupportsMimeType(const nsACString& aMimeType,
|
||||||
{
|
{
|
||||||
bool supports =
|
bool supports =
|
||||||
VPXDecoder::IsVPX(aMimeType) ||
|
VPXDecoder::IsVPX(aMimeType) ||
|
||||||
|
#ifdef MOZ_AV1
|
||||||
|
AOMDecoder::IsAV1(aMimeType) ||
|
||||||
|
#endif
|
||||||
OpusDataDecoder::IsOpus(aMimeType) ||
|
OpusDataDecoder::IsOpus(aMimeType) ||
|
||||||
VorbisDataDecoder::IsVorbis(aMimeType) ||
|
VorbisDataDecoder::IsVorbis(aMimeType) ||
|
||||||
WaveDataDecoder::IsWave(aMimeType) ||
|
WaveDataDecoder::IsWave(aMimeType) ||
|
||||||
|
|
@ -36,7 +43,13 @@ AgnosticDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams)
|
||||||
|
|
||||||
if (VPXDecoder::IsVPX(aParams.mConfig.mMimeType)) {
|
if (VPXDecoder::IsVPX(aParams.mConfig.mMimeType)) {
|
||||||
m = new VPXDecoder(aParams);
|
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);
|
m = new TheoraDecoder(aParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue