mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1147692 - Remove gmp-decryptor backwards compatibility hack. r=edwin
This commit is contained in:
parent
c8f966999e
commit
1d3b9242dc
@ -141,8 +141,7 @@ AdobePluginVoucherExists(const nsACString& aVersionStr)
|
||||
static MediaKeySystemStatus
|
||||
EnsureMinCDMVersion(mozIGeckoMediaPluginService* aGMPService,
|
||||
const nsAString& aKeySystem,
|
||||
int32_t aMinCdmVersion,
|
||||
bool aCheckForV6=false)
|
||||
int32_t aMinCdmVersion)
|
||||
{
|
||||
nsTArray<nsCString> tags;
|
||||
tags.AppendElement(NS_ConvertUTF16toUTF8(aKeySystem));
|
||||
@ -151,13 +150,7 @@ EnsureMinCDMVersion(mozIGeckoMediaPluginService* aGMPService,
|
||||
if (NS_FAILED(aGMPService->GetPluginVersionForAPI(NS_LITERAL_CSTRING(GMP_API_DECRYPTOR),
|
||||
&tags,
|
||||
&hasPlugin,
|
||||
versionStr)) ||
|
||||
// XXX to be removed later in bug 1147692
|
||||
(aCheckForV6 && !hasPlugin &&
|
||||
NS_FAILED(aGMPService->GetPluginVersionForAPI(NS_LITERAL_CSTRING(GMP_API_DECRYPTOR_COMPAT),
|
||||
&tags,
|
||||
&hasPlugin,
|
||||
versionStr)))) {
|
||||
versionStr))) {
|
||||
return MediaKeySystemStatus::Error;
|
||||
}
|
||||
|
||||
@ -232,7 +225,7 @@ MediaKeySystemAccess::GetKeySystemStatus(const nsAString& aKeySystem,
|
||||
// Adobe EME isn't going to work, so don't advertise that it will.
|
||||
return MediaKeySystemStatus::Cdm_not_supported;
|
||||
}
|
||||
return EnsureMinCDMVersion(mps, aKeySystem, aMinCdmVersion, true);
|
||||
return EnsureMinCDMVersion(mps, aKeySystem, aMinCdmVersion);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -274,25 +267,15 @@ IsPlayableWithGMP(mozIGeckoMediaPluginService* aGMPS,
|
||||
return false;
|
||||
}
|
||||
return (!hasAAC ||
|
||||
!(HaveGMPFor(aGMPS,
|
||||
NS_ConvertUTF16toUTF8(aKeySystem),
|
||||
NS_LITERAL_CSTRING(GMP_API_DECRYPTOR),
|
||||
NS_LITERAL_CSTRING("aac")) ||
|
||||
// XXX remove later in bug 1147692
|
||||
HaveGMPFor(aGMPS,
|
||||
NS_ConvertUTF16toUTF8(aKeySystem),
|
||||
NS_LITERAL_CSTRING(GMP_API_DECRYPTOR_COMPAT),
|
||||
NS_LITERAL_CSTRING("aac")))) &&
|
||||
!HaveGMPFor(aGMPS,
|
||||
NS_ConvertUTF16toUTF8(aKeySystem),
|
||||
NS_LITERAL_CSTRING(GMP_API_DECRYPTOR),
|
||||
NS_LITERAL_CSTRING("aac"))) &&
|
||||
(!hasH264 ||
|
||||
!(HaveGMPFor(aGMPS,
|
||||
NS_ConvertUTF16toUTF8(aKeySystem),
|
||||
NS_LITERAL_CSTRING(GMP_API_DECRYPTOR),
|
||||
NS_LITERAL_CSTRING("h264")) ||
|
||||
// XXX remove later in bug 1147692
|
||||
HaveGMPFor(aGMPS,
|
||||
NS_ConvertUTF16toUTF8(aKeySystem),
|
||||
NS_LITERAL_CSTRING(GMP_API_DECRYPTOR_COMPAT),
|
||||
NS_LITERAL_CSTRING("h264"))));
|
||||
!HaveGMPFor(aGMPS,
|
||||
NS_ConvertUTF16toUTF8(aKeySystem),
|
||||
NS_LITERAL_CSTRING(GMP_API_DECRYPTOR),
|
||||
NS_LITERAL_CSTRING("h264")));
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
@ -118,11 +118,6 @@ GMPContentChild::RecvPGMPDecryptorConstructor(PGMPDecryptorChild* aActor)
|
||||
|
||||
void* session = nullptr;
|
||||
GMPErr err = mGMPChild->GetAPI(GMP_API_DECRYPTOR, host, &session);
|
||||
if (err != GMPNoErr && !session) {
|
||||
// XXX to remove in bug 1147692
|
||||
err = mGMPChild->GetAPI(GMP_API_DECRYPTOR_COMPAT, host, &session);
|
||||
}
|
||||
|
||||
if (err != GMPNoErr || !session) {
|
||||
return false;
|
||||
}
|
||||
|
@ -818,8 +818,7 @@ GMPParent::ReadGMPMetaData()
|
||||
}
|
||||
}
|
||||
|
||||
if (cap->mAPIName.EqualsLiteral(GMP_API_DECRYPTOR) ||
|
||||
cap->mAPIName.EqualsLiteral(GMP_API_DECRYPTOR_COMPAT)) {
|
||||
if (cap->mAPIName.EqualsLiteral(GMP_API_DECRYPTOR)) {
|
||||
mCanDecrypt = true;
|
||||
|
||||
#if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
|
||||
|
@ -668,13 +668,6 @@ GeckoMediaPluginServiceParent::SelectPluginForAPI(const nsACString& aNodeId,
|
||||
return clone;
|
||||
}
|
||||
|
||||
if (aAPI.EqualsLiteral(GMP_API_DECRYPTOR)) {
|
||||
// XXX to remove in bug 1147692
|
||||
return SelectPluginForAPI(aNodeId,
|
||||
NS_LITERAL_CSTRING(GMP_API_DECRYPTOR_COMPAT),
|
||||
aTags);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -240,9 +240,6 @@ enum GMPSessionType {
|
||||
|
||||
#define GMP_API_DECRYPTOR "eme-decrypt-v7"
|
||||
|
||||
// XXX remove in bug 1147692
|
||||
#define GMP_API_DECRYPTOR_COMPAT "eme-decrypt-v6"
|
||||
|
||||
// API exposed by plugin library to manage decryption sessions.
|
||||
// When the Host requests this by calling GMPGetAPIFunc().
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user