Bug 1321076 - PDMFactory defaults to using VPXDecoder when alpha is present. r=jya

FFmpegDecoderModule and AndroidDecoderModule returns nullptr if alpha is
present, then PDMFactory rolls over to using VPXDecoder.

MozReview-Commit-ID: H2JaolEfJgR

--HG--
extra : rebase_source : a2b4bad848c6350041c2cff805803fb5728342d2
This commit is contained in:
karo 2016-12-21 15:00:17 +13:00
Родитель 60f87e60ec
Коммит a91edd5c7a
2 изменённых файлов: 14 добавлений и 0 удалений

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

@ -174,6 +174,13 @@ AndroidDecoderModule::SupportsMimeType(const nsACString& aMimeType,
already_AddRefed<MediaDataDecoder>
AndroidDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams)
{
// Temporary - forces use of VPXDecoder when alpha is present.
// Bug 1263836 will handle alpha scenario once implemented. It will shift
// the check for alpha to PDMFactory but not itself remove the need for a
// check.
if (aParams.VideoConfig().HasAlpha()) {
return nullptr;
}
MediaFormat::LocalRef format;
const VideoInfo& config = aParams.VideoConfig();

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

@ -33,6 +33,13 @@ public:
already_AddRefed<MediaDataDecoder>
CreateVideoDecoder(const CreateDecoderParams& aParams) override
{
// Temporary - forces use of VPXDecoder when alpha is present.
// Bug 1263836 will handle alpha scenario once implemented. It will shift
// the check for alpha to PDMFactory but not itself remove the need for a
// check.
if (aParams.VideoConfig().HasAlpha()) {
return nullptr;
}
RefPtr<MediaDataDecoder> decoder =
new FFmpegVideoDecoder<V>(mLib,
aParams.mTaskQueue,