diff options
author | adeshkp <adeshkp@users.noreply.github.com> | 2019-11-09 21:42:45 +0530 |
---|---|---|
committer | adeshkp <adeshkp@users.noreply.github.com> | 2019-11-10 06:01:40 -0500 |
commit | 0fb5f7a158e0a5a610e1ba85cf408525964d746e (patch) | |
tree | 22df72bc308a67dffec02c0aa94ff2969e78e209 /dom/media/eme | |
parent | 736d25cbec4541186ed46c935c117ce4d1c7f3bb (diff) | |
download | UXP-0fb5f7a158e0a5a610e1ba85cf408525964d746e.tar UXP-0fb5f7a158e0a5a610e1ba85cf408525964d746e.tar.gz UXP-0fb5f7a158e0a5a610e1ba85cf408525964d746e.tar.lz UXP-0fb5f7a158e0a5a610e1ba85cf408525964d746e.tar.xz UXP-0fb5f7a158e0a5a610e1ba85cf408525964d746e.zip |
Issue #1259 - Part 1. Remove Adobe Primetime support from tree
Diffstat (limited to 'dom/media/eme')
-rw-r--r-- | dom/media/eme/EMEUtils.cpp | 11 | ||||
-rw-r--r-- | dom/media/eme/EMEUtils.h | 4 | ||||
-rw-r--r-- | dom/media/eme/MediaKeySystemAccess.cpp | 23 | ||||
-rw-r--r-- | dom/media/eme/MediaKeySystemAccessManager.cpp | 5 |
4 files changed, 2 insertions, 41 deletions
diff --git a/dom/media/eme/EMEUtils.cpp b/dom/media/eme/EMEUtils.cpp index c248b3a24..11eb0026e 100644 --- a/dom/media/eme/EMEUtils.cpp +++ b/dom/media/eme/EMEUtils.cpp @@ -54,12 +54,6 @@ IsClearkeyKeySystem(const nsAString& aKeySystem) } bool -IsPrimetimeKeySystem(const nsAString& aKeySystem) -{ - return !CompareUTF8toUTF16(kEMEKeySystemPrimetime, aKeySystem); -} - -bool IsWidevineKeySystem(const nsAString& aKeySystem) { return !CompareUTF8toUTF16(kEMEKeySystemWidevine, aKeySystem); @@ -68,9 +62,6 @@ IsWidevineKeySystem(const nsAString& aKeySystem) nsString KeySystemToGMPName(const nsAString& aKeySystem) { - if (IsPrimetimeKeySystem(aKeySystem)) { - return NS_LITERAL_STRING("gmp-eme-adobe"); - } if (IsClearkeyKeySystem(aKeySystem)) { return NS_LITERAL_STRING("gmp-clearkey"); } @@ -88,8 +79,6 @@ ToCDMTypeTelemetryEnum(const nsString& aKeySystem) return CDMType::eWidevine; } else if (IsClearkeyKeySystem(aKeySystem)) { return CDMType::eClearKey; - } else if (IsPrimetimeKeySystem(aKeySystem)) { - return CDMType::ePrimetime; } return CDMType::eUnknown; } diff --git a/dom/media/eme/EMEUtils.h b/dom/media/eme/EMEUtils.h index 1794f8462..4a2e5da18 100644 --- a/dom/media/eme/EMEUtils.h +++ b/dom/media/eme/EMEUtils.h @@ -87,14 +87,10 @@ bool IsClearkeyKeySystem(const nsAString& aKeySystem); bool -IsPrimetimeKeySystem(const nsAString& aKeySystem); - -bool IsWidevineKeySystem(const nsAString& aKeySystem); enum CDMType { eClearKey = 0, - ePrimetime = 1, eWidevine = 2, eUnknown = 3 }; diff --git a/dom/media/eme/MediaKeySystemAccess.cpp b/dom/media/eme/MediaKeySystemAccess.cpp index 4cff464e7..4a5a7a30c 100644 --- a/dom/media/eme/MediaKeySystemAccess.cpp +++ b/dom/media/eme/MediaKeySystemAccess.cpp @@ -134,16 +134,6 @@ MediaKeySystemAccess::GetKeySystemStatus(const nsAString& aKeySystem, return EnsureCDMInstalled(aKeySystem, aOutMessage); } - if (Preferences::GetBool("media.gmp-eme-adobe.visible", false)) { - if (IsPrimetimeKeySystem(aKeySystem)) { - if (!Preferences::GetBool("media.gmp-eme-adobe.enabled", false)) { - aOutMessage = NS_LITERAL_CSTRING("Adobe EME disabled"); - return MediaKeySystemStatus::Cdm_disabled; - } - return EnsureCDMInstalled(aKeySystem, aOutMessage); - } - } - if (IsWidevineKeySystem(aKeySystem)) { if (Preferences::GetBool("media.gmp-widevinecdm.visible", false)) { if (!Preferences::GetBool("media.gmp-widevinecdm.enabled", false)) { @@ -376,19 +366,6 @@ GetSupportedKeySystems() keySystemConfigs.AppendElement(Move(widevine)); } } - { - if (HavePluginForKeySystem(kEMEKeySystemPrimetime)) { - KeySystemConfig primetime; - primetime.mKeySystem = NS_ConvertUTF8toUTF16(kEMEKeySystemPrimetime); - primetime.mInitDataTypes.AppendElement(NS_LITERAL_STRING("cenc")); - primetime.mPersistentState = KeySystemFeatureSupport::Required; - primetime.mDistinctiveIdentifier = KeySystemFeatureSupport::Required; - primetime.mSessionTypes.AppendElement(MediaKeySessionType::Temporary); - primetime.mMP4.SetCanDecryptAndDecode(EME_CODEC_AAC); - primetime.mMP4.SetCanDecryptAndDecode(EME_CODEC_H264); - keySystemConfigs.AppendElement(Move(primetime)); - } - } return keySystemConfigs; } diff --git a/dom/media/eme/MediaKeySystemAccessManager.cpp b/dom/media/eme/MediaKeySystemAccessManager.cpp index 8fefc62ec..ed31059e2 100644 --- a/dom/media/eme/MediaKeySystemAccessManager.cpp +++ b/dom/media/eme/MediaKeySystemAccessManager.cpp @@ -95,8 +95,7 @@ MediaKeySystemAccessManager::Request(DetailedPromise* aPromise, // Ensure keysystem is supported. if (!IsWidevineKeySystem(aKeySystem) && - !IsClearkeyKeySystem(aKeySystem) && - !IsPrimetimeKeySystem(aKeySystem)) { + !IsClearkeyKeySystem(aKeySystem)) { // Not to inform user, because nothing to do if the keySystem is not // supported. aPromise->MaybeReject(NS_ERROR_DOM_NOT_SUPPORTED_ERR, @@ -132,7 +131,7 @@ MediaKeySystemAccessManager::Request(DetailedPromise* aPromise, LogToBrowserConsole(NS_ConvertUTF8toUTF16(msg)); if (status == MediaKeySystemStatus::Cdm_not_installed && - (IsPrimetimeKeySystem(aKeySystem) || IsWidevineKeySystem(aKeySystem))) { + IsWidevineKeySystem(aKeySystem)) { // These are cases which could be resolved by downloading a new(er) CDM. // When we send the status to chrome, chrome's GMPProvider will attempt to // download or update the CDM. In AwaitInstall() we add listeners to wait |