зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1315850 - Create CDM video decoder in EMEDecoderModule. r=jya
MozReview-Commit-ID: 3xgFxg1WfmY --HG-- extra : rebase_source : 018abf2b8e1b351a29ba62275a2681fe9ea4fc24
This commit is contained in:
Родитель
ffe9c27064
Коммит
42faf7c8fa
|
@ -353,7 +353,11 @@ EMEDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams)
|
|||
RefPtr<MediaDataDecoderProxy> wrapper =
|
||||
CreateDecoderWrapper(mProxy, aParams);
|
||||
auto params = GMPVideoDecoderParams(aParams);
|
||||
wrapper->SetProxyTarget(new EMEVideoDecoder(mProxy, params));
|
||||
if (MediaPrefs::EMEChromiumAPIEnabled()) {
|
||||
wrapper->SetProxyTarget(new ChromiumCDMVideoDecoder(params, mProxy));
|
||||
} else {
|
||||
wrapper->SetProxyTarget(new EMEVideoDecoder(mProxy, params));
|
||||
}
|
||||
return wrapper.forget();
|
||||
}
|
||||
|
||||
|
|
|
@ -79,19 +79,20 @@ GMPDecoderModule::SupportsMimeType(const nsACString& aMimeType,
|
|||
return false;
|
||||
}
|
||||
|
||||
nsCString api = MediaPrefs::EMEChromiumAPIEnabled()
|
||||
? NS_LITERAL_CSTRING(CHROMIUM_CDM_API)
|
||||
: NS_LITERAL_CSTRING(GMP_API_VIDEO_DECODER);
|
||||
|
||||
if (MP4Decoder::IsH264(aMimeType)) {
|
||||
return HaveGMPFor(NS_LITERAL_CSTRING(GMP_API_VIDEO_DECODER),
|
||||
{ NS_LITERAL_CSTRING("h264"), aGMP.value()});
|
||||
return HaveGMPFor(api, { NS_LITERAL_CSTRING("h264"), aGMP.value()});
|
||||
}
|
||||
|
||||
if (VPXDecoder::IsVP9(aMimeType)) {
|
||||
return HaveGMPFor(NS_LITERAL_CSTRING(GMP_API_VIDEO_DECODER),
|
||||
{ NS_LITERAL_CSTRING("vp9"), aGMP.value()});
|
||||
return HaveGMPFor(api, { NS_LITERAL_CSTRING("vp9"), aGMP.value()});
|
||||
}
|
||||
|
||||
if (VPXDecoder::IsVP8(aMimeType)) {
|
||||
return HaveGMPFor(NS_LITERAL_CSTRING(GMP_API_VIDEO_DECODER),
|
||||
{ NS_LITERAL_CSTRING("vp8"), aGMP.value()});
|
||||
return HaveGMPFor(api, { NS_LITERAL_CSTRING("vp8"), aGMP.value()});
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче