diff --git a/dom/media/eme/EMEUtils.cpp b/dom/media/eme/EMEUtils.cpp index f43dd1b750a1..08443f4ae6a7 100644 --- a/dom/media/eme/EMEUtils.cpp +++ b/dom/media/eme/EMEUtils.cpp @@ -192,10 +192,6 @@ void MFCDMCapabilitiesIPDLToKeySystemConfig( } aKeySystemConfig.mPersistentState = aCDMConfig.persistentState(); aKeySystemConfig.mDistinctiveIdentifier = aCDMConfig.distinctiveID(); - for (const auto& scheme : aCDMConfig.encryptionSchemes()) { - aKeySystemConfig.mEncryptionSchemes.AppendElement( - NS_ConvertUTF8toUTF16(CryptoSchemeToString(scheme))); - } aKeySystemConfig.mIsHDCP22Compatible = aCDMConfig.isHDCP22Compatible() ? *aCDMConfig.isHDCP22Compatible() : false; diff --git a/dom/media/eme/KeySystemConfig.cpp b/dom/media/eme/KeySystemConfig.cpp index a1b6f9b2b08d..b6aed96738e4 100644 --- a/dom/media/eme/KeySystemConfig.cpp +++ b/dom/media/eme/KeySystemConfig.cpp @@ -79,9 +79,6 @@ bool KeySystemConfig::Supports(const nsAString& aKeySystem) { config->mPersistentState = Requirement::Optional; config->mDistinctiveIdentifier = Requirement::NotAllowed; config->mSessionTypes.AppendElement(SessionType::Temporary); - config->mEncryptionSchemes.AppendElement(u"cenc"_ns); - config->mEncryptionSchemes.AppendElement(u"cbcs"_ns); - config->mEncryptionSchemes.AppendElement(u"cbcs-1-9"_ns); if (StaticPrefs::media_clearkey_persistent_license_enabled()) { config->mSessionTypes.AppendElement(SessionType::PersistentLicense); } @@ -137,9 +134,6 @@ bool KeySystemConfig::Supports(const nsAString& aKeySystem) { config->mAudioRobustness.AppendElement(u"SW_SECURE_CRYPTO"_ns); config->mVideoRobustness.AppendElement(u"SW_SECURE_CRYPTO"_ns); config->mVideoRobustness.AppendElement(u"SW_SECURE_DECODE"_ns); - config->mEncryptionSchemes.AppendElement(u"cenc"_ns); - config->mEncryptionSchemes.AppendElement(u"cbcs"_ns); - config->mEncryptionSchemes.AppendElement(u"cbcs-1-9"_ns); #if defined(MOZ_WIDGET_ANDROID) // MediaDrm.isCryptoSchemeSupported only allows passing @@ -368,14 +362,6 @@ nsString KeySystemConfig::GetDebugInfo() const { debugInfo.AppendLiteral(","); } } - debugInfo.AppendLiteral(" scheme=["); - for (size_t idx = 0; idx < mEncryptionSchemes.Length(); idx++) { - debugInfo.Append(mEncryptionSchemes[idx]); - if (idx + 1 < mEncryptionSchemes.Length()) { - debugInfo.AppendLiteral(","); - } - } - debugInfo.AppendLiteral("]"); debugInfo.AppendLiteral(" MP4={"); debugInfo.Append(NS_ConvertUTF8toUTF16(mMP4.GetDebugInfo())); debugInfo.AppendLiteral("}"); diff --git a/dom/media/eme/KeySystemConfig.h b/dom/media/eme/KeySystemConfig.h index eb94ed9e3aab..277e012db1ad 100644 --- a/dom/media/eme/KeySystemConfig.h +++ b/dom/media/eme/KeySystemConfig.h @@ -207,7 +207,6 @@ struct KeySystemConfig { mSessionTypes = aOther.mSessionTypes.Clone(); mVideoRobustness = aOther.mVideoRobustness.Clone(); mAudioRobustness = aOther.mAudioRobustness.Clone(); - mEncryptionSchemes = aOther.mEncryptionSchemes.Clone(); mMP4 = aOther.mMP4; mWebM = aOther.mWebM; } @@ -222,7 +221,6 @@ struct KeySystemConfig { mSessionTypes = aOther.mSessionTypes.Clone(); mVideoRobustness = aOther.mVideoRobustness.Clone(); mAudioRobustness = aOther.mAudioRobustness.Clone(); - mEncryptionSchemes = aOther.mEncryptionSchemes.Clone(); mMP4 = aOther.mMP4; mWebM = aOther.mWebM; return *this; @@ -239,7 +237,6 @@ struct KeySystemConfig { nsTArray mSessionTypes; nsTArray mVideoRobustness; nsTArray mAudioRobustness; - nsTArray mEncryptionSchemes; ContainerSupport mMP4; ContainerSupport mWebM; bool mIsHDCP22Compatible = false; diff --git a/dom/media/eme/mediafoundation/WMFCDMImpl.cpp b/dom/media/eme/mediafoundation/WMFCDMImpl.cpp index 8f8f72c0d2c1..3ef842312d0e 100644 --- a/dom/media/eme/mediafoundation/WMFCDMImpl.cpp +++ b/dom/media/eme/mediafoundation/WMFCDMImpl.cpp @@ -105,10 +105,6 @@ WMFCDMCapabilites::GetCapabilities( CryptoSchemeToString(scheme)); } } - for (const auto& v : capabilities.encryptionSchemes()) { - EME_LOG("capabilities: encryptionScheme=%s", - CryptoSchemeToString(v)); - } KeySystemConfig* config = outConfigs.AppendElement(); MFCDMCapabilitiesIPDLToKeySystemConfig(capabilities, *config); } diff --git a/dom/media/ipc/MFCDMParent.cpp b/dom/media/ipc/MFCDMParent.cpp index eff7f331f817..0ae93eb46f34 100644 --- a/dom/media/ipc/MFCDMParent.cpp +++ b/dom/media/ipc/MFCDMParent.cpp @@ -854,10 +854,8 @@ void MFCDMParent::GetCapabilities(const nsString& aKeySystem, CryptoScheme::Cbcs, }); - // Remember supported video codecs. - // It will be used when collecting audio codec and encryption scheme - // support. - // TODO : scheme part should be removed later + // Remember supported video codecs, which will be used when collecting audio + // codec support. nsTArray supportedVideoCodecs; if (aFlags.contains(CapabilitesFlag::NeedClearLeadCheck)) { @@ -987,31 +985,6 @@ void MFCDMParent::GetCapabilities(const nsString& aKeySystem, } } - // 'If value is unspecified, default value of "cenc" is used.' See - // https://learn.microsoft.com/en-us/windows/win32/api/mfmediaengine/nf-mfmediaengine-imfextendeddrmtypesupport-istypesupportedex - if (!supportedVideoCodecs.IsEmpty()) { - aCapabilitiesOut.encryptionSchemes().AppendElement(CryptoScheme::Cenc); - MFCDM_PARENT_SLOG("%s: +scheme:cenc", __func__); - } - - // Check another scheme "cbcs" - static std::pair kCbcs = - std::pair( - CryptoScheme::Cbcs, u"encryption-type=cbcs,encryption-iv-size=16,"); - bool ok = true; - for (const auto& codec : supportedVideoCodecs) { - ok &= FactorySupports(factory, aKeySystem, convertCodecToFourCC(codec), - nsCString(""), kCbcs.second /* additional feature */, - isHardwareDecryption); - if (!ok) { - break; - } - } - if (ok) { - aCapabilitiesOut.encryptionSchemes().AppendElement(kCbcs.first); - MFCDM_PARENT_SLOG("%s: +scheme:cbcs", __func__); - } - // Only perform HDCP if necessary, "The hdcp query (item 4) has a // computationally expensive first invocation cost". See // https://learn.microsoft.com/en-us/windows/win32/api/mfmediaengine/nf-mfmediaengine-imfextendeddrmtypesupport-istypesupportedex diff --git a/dom/media/ipc/PMFCDM.ipdl b/dom/media/ipc/PMFCDM.ipdl index 93b77d220718..c9f68f187fe6 100644 --- a/dom/media/ipc/PMFCDM.ipdl +++ b/dom/media/ipc/PMFCDM.ipdl @@ -56,7 +56,6 @@ struct MFCDMCapabilitiesIPDL { MFCDMMediaCapability[] audioCapabilities; MFCDMMediaCapability[] videoCapabilities; SessionType[] sessionTypes; - CryptoScheme[] encryptionSchemes; Requirement distinctiveID; Requirement persistentState; bool? isHDCP22Compatible; diff --git a/ipc/glue/UtilityAudioDecoderChild.cpp b/ipc/glue/UtilityAudioDecoderChild.cpp index c631b4e4faa1..56db4b68bbb6 100644 --- a/ipc/glue/UtilityAudioDecoderChild.cpp +++ b/ipc/glue/UtilityAudioDecoderChild.cpp @@ -235,10 +235,6 @@ void UtilityAudioDecoderChild::GetKeySystemCapabilities( CryptoSchemeToString(scheme)); } } - for (const auto& e : capabilities.encryptionSchemes()) { - EME_LOG(" capabilities: encryptionScheme=%s", - CryptoSchemeToString(e)); - } auto* info = cdmInfo.AppendElement(fallible); if (!info) { promise->MaybeReject(NS_ERROR_OUT_OF_MEMORY); diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index 6b75776bd67d..282ab5b921e8 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -1169,7 +1169,6 @@ var snapshotFormatters = { capabilities.persistent = findElementInArray(array, "persistent"); capabilities.distinctive = findElementInArray(array, "distinctive"); capabilities.sessionType = findElementInArray(array, "sessionType"); - capabilities.scheme = findElementInArray(array, "scheme"); capabilities.codec = getSupportedCodecs(array); return JSON.stringify(capabilities); }