forked from mirrors/gecko-dev
Bug 1815553 - follow the naming convention of existing code (mf -> wmf). r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D169401
This commit is contained in:
parent
1e64234ac7
commit
38b0fef2bc
14 changed files with 29 additions and 29 deletions
|
|
@ -65,7 +65,7 @@ bool IsWidevineKeySystem(const nsAString& aKeySystem) {
|
||||||
return aKeySystem.EqualsLiteral(kWidevineKeySystemName);
|
return aKeySystem.EqualsLiteral(kWidevineKeySystemName);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
bool IsPlayReadyKeySystem(const nsAString& aKeySystem) {
|
bool IsPlayReadyKeySystem(const nsAString& aKeySystem) {
|
||||||
return aKeySystem.EqualsLiteral(kPlayReadyKeySystemName) ||
|
return aKeySystem.EqualsLiteral(kPlayReadyKeySystemName) ||
|
||||||
aKeySystem.EqualsLiteral(kPlayReadyKeySystemNameDeprecated);
|
aKeySystem.EqualsLiteral(kPlayReadyKeySystemNameDeprecated);
|
||||||
|
|
@ -79,7 +79,7 @@ nsString KeySystemToProxyName(const nsAString& aKeySystem) {
|
||||||
if (IsWidevineKeySystem(aKeySystem)) {
|
if (IsWidevineKeySystem(aKeySystem)) {
|
||||||
return u"gmp-widevinecdm"_ns;
|
return u"gmp-widevinecdm"_ns;
|
||||||
}
|
}
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
if (IsPlayReadyKeySystem(aKeySystem)) {
|
if (IsPlayReadyKeySystem(aKeySystem)) {
|
||||||
return u"mfcdm-playready"_ns;
|
return u"mfcdm-playready"_ns;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ bool IsClearkeyKeySystem(const nsAString& aKeySystem);
|
||||||
|
|
||||||
bool IsWidevineKeySystem(const nsAString& aKeySystem);
|
bool IsWidevineKeySystem(const nsAString& aKeySystem);
|
||||||
|
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
bool IsPlayReadyKeySystem(const nsAString& aKeySystem);
|
bool IsPlayReadyKeySystem(const nsAString& aKeySystem);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
# include "nsMimeTypes.h"
|
# include "nsMimeTypes.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
# include "mediafoundation/WMFCDMImpl.h"
|
# include "mediafoundation/WMFCDMImpl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ bool KeySystemConfig::Supports(const nsAString& aKeySystem) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if MOZ_MF_CDM
|
#if MOZ_WMF_CDM
|
||||||
if (IsPlayReadyKeySystem(aKeySystem) && WMFCDMImpl::Supports(aKeySystem)) {
|
if (IsPlayReadyKeySystem(aKeySystem) && WMFCDMImpl::Supports(aKeySystem)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -175,7 +175,7 @@ bool KeySystemConfig::GetConfig(const nsAString& aKeySystem,
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
if (IsPlayReadyKeySystem(aKeySystem)) {
|
if (IsPlayReadyKeySystem(aKeySystem)) {
|
||||||
RefPtr<WMFCDMImpl> cdm = MakeRefPtr<WMFCDMImpl>(aKeySystem);
|
RefPtr<WMFCDMImpl> cdm = MakeRefPtr<WMFCDMImpl>(aKeySystem);
|
||||||
return cdm->GetCapabilities(aConfig);
|
return cdm->GetCapabilities(aConfig);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ inline constexpr char kClearKeyKeySystemName[] = "org.w3.clearkey";
|
||||||
inline constexpr char kClearKeyWithProtectionQueryKeySystemName[] =
|
inline constexpr char kClearKeyWithProtectionQueryKeySystemName[] =
|
||||||
"org.mozilla.clearkey_with_protection_query";
|
"org.mozilla.clearkey_with_protection_query";
|
||||||
inline constexpr char kWidevineKeySystemName[] = "com.widevine.alpha";
|
inline constexpr char kWidevineKeySystemName[] = "com.widevine.alpha";
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
// https://learn.microsoft.com/en-us/playready/overview/key-system-strings
|
// https://learn.microsoft.com/en-us/playready/overview/key-system-strings
|
||||||
inline constexpr char kPlayReadyKeySystemName[] =
|
inline constexpr char kPlayReadyKeySystemName[] =
|
||||||
"com.microsoft.playready.recommendation";
|
"com.microsoft.playready.recommendation";
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ MediaKeySystemStatus MediaKeySystemAccess::GetKeySystemStatus(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
if (IsPlayReadyKeySystem(aKeySystem)) {
|
if (IsPlayReadyKeySystem(aKeySystem)) {
|
||||||
if (!StaticPrefs::media_eme_playready_enabled()) {
|
if (!StaticPrefs::media_eme_playready_enabled()) {
|
||||||
aOutMessage = "PlayReady EME disabled"_ns;
|
aOutMessage = "PlayReady EME disabled"_ns;
|
||||||
|
|
@ -168,7 +168,7 @@ static nsTArray<KeySystemConfig> GetSupportedKeySystems() {
|
||||||
const nsTArray<nsString> keySystemNames{
|
const nsTArray<nsString> keySystemNames{
|
||||||
NS_ConvertUTF8toUTF16(kClearKeyKeySystemName),
|
NS_ConvertUTF8toUTF16(kClearKeyKeySystemName),
|
||||||
NS_ConvertUTF8toUTF16(kWidevineKeySystemName),
|
NS_ConvertUTF8toUTF16(kWidevineKeySystemName),
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
NS_ConvertUTF8toUTF16(kPlayReadyKeySystemName),
|
NS_ConvertUTF8toUTF16(kPlayReadyKeySystemName),
|
||||||
NS_ConvertUTF8toUTF16(kPlayReadyKeySystemNameDeprecated),
|
NS_ConvertUTF8toUTF16(kPlayReadyKeySystemNameDeprecated),
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,7 @@ void MediaKeySystemAccessManager::RequestMediaKeySystemAccess(
|
||||||
// agent, reject promise with a NotSupportedError. String comparison is
|
// agent, reject promise with a NotSupportedError. String comparison is
|
||||||
// case-sensitive.
|
// case-sensitive.
|
||||||
if (!IsWidevineKeySystem(aRequest->mKeySystem) &&
|
if (!IsWidevineKeySystem(aRequest->mKeySystem) &&
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
!IsPlayReadyKeySystem(aRequest->mKeySystem) &&
|
!IsPlayReadyKeySystem(aRequest->mKeySystem) &&
|
||||||
#endif
|
#endif
|
||||||
!IsClearkeyKeySystem(aRequest->mKeySystem)) {
|
!IsClearkeyKeySystem(aRequest->mKeySystem)) {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
# include "mozilla/WindowsVersion.h"
|
# include "mozilla/WindowsVersion.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
# include "mozilla/WMFCDMProxy.h"
|
# include "mozilla/WMFCDMProxy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -438,7 +438,7 @@ already_AddRefed<CDMProxy> MediaKeys::CreateCDMProxy() {
|
||||||
mConfig.mPersistentState == MediaKeysRequirement::Required);
|
mConfig.mPersistentState == MediaKeysRequirement::Required);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
if (IsPlayReadyKeySystem(mKeySystem)) {
|
if (IsPlayReadyKeySystem(mKeySystem)) {
|
||||||
proxy = new WMFCDMProxy(
|
proxy = new WMFCDMProxy(
|
||||||
this, mKeySystem,
|
this, mKeySystem,
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
|
||||||
DIRS += ["mediadrm"]
|
DIRS += ["mediadrm"]
|
||||||
LOCAL_INCLUDES += ["/dom/media/platforms/android"]
|
LOCAL_INCLUDES += ["/dom/media/platforms/android"]
|
||||||
|
|
||||||
if CONFIG["MOZ_MF_CDM"]:
|
if CONFIG["MOZ_WMF_CDM"]:
|
||||||
DIRS += ["mediafoundation"]
|
DIRS += ["mediafoundation"]
|
||||||
|
|
||||||
include("/ipc/chromium/chromium-config.mozbuild")
|
include("/ipc/chromium/chromium-config.mozbuild")
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#ifdef MOZ_WMF_MEDIA_ENGINE
|
#ifdef MOZ_WMF_MEDIA_ENGINE
|
||||||
include protocol PMFMediaEngine;
|
include protocol PMFMediaEngine;
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
include protocol PMFCDM;
|
include protocol PMFCDM;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ sync protocol PRemoteDecoderManager
|
||||||
#ifdef MOZ_WMF_MEDIA_ENGINE
|
#ifdef MOZ_WMF_MEDIA_ENGINE
|
||||||
manages PMFMediaEngine;
|
manages PMFMediaEngine;
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
manages PMFCDM;
|
manages PMFCDM;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ parent:
|
||||||
#ifdef MOZ_WMF_MEDIA_ENGINE
|
#ifdef MOZ_WMF_MEDIA_ENGINE
|
||||||
async PMFMediaEngine();
|
async PMFMediaEngine();
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
async PMFCDM(nsString keySystem);
|
async PMFCDM(nsString keySystem);
|
||||||
#endif
|
#endif
|
||||||
async PRemoteDecoder(RemoteDecoderInfoIPDL info,
|
async PRemoteDecoder(RemoteDecoderInfoIPDL info,
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
# include "MFMediaEngineChild.h"
|
# include "MFMediaEngineChild.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
# include "MFCDMChild.h"
|
# include "MFCDMChild.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -704,7 +704,7 @@ PMFCDMChild* RemoteDecoderManagerChild::AllocPMFCDMChild(const nsAString&) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RemoteDecoderManagerChild::DeallocPMFCDMChild(PMFCDMChild* actor) {
|
bool RemoteDecoderManagerChild::DeallocPMFCDMChild(PMFCDMChild* actor) {
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
static_cast<MFCDMChild*>(actor)->IPDLActorDestroyed();
|
static_cast<MFCDMChild*>(actor)->IPDLActorDestroyed();
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
# include "MFMediaEngineParent.h"
|
# include "MFMediaEngineParent.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
# include "MFCDMParent.h"
|
# include "MFCDMParent.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -259,7 +259,7 @@ bool RemoteDecoderManagerParent::DeallocPMFMediaEngineParent(
|
||||||
|
|
||||||
PMFCDMParent* RemoteDecoderManagerParent::AllocPMFCDMParent(
|
PMFCDMParent* RemoteDecoderManagerParent::AllocPMFCDMParent(
|
||||||
const nsAString& aKeySystem) {
|
const nsAString& aKeySystem) {
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
return new MFCDMParent(aKeySystem, this, sRemoteDecoderManagerParentThread);
|
return new MFCDMParent(aKeySystem, this, sRemoteDecoderManagerParentThread);
|
||||||
#else
|
#else
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
@ -267,7 +267,7 @@ PMFCDMParent* RemoteDecoderManagerParent::AllocPMFCDMParent(
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RemoteDecoderManagerParent::DeallocPMFCDMParent(PMFCDMParent* actor) {
|
bool RemoteDecoderManagerParent::DeallocPMFCDMParent(PMFCDMParent* actor) {
|
||||||
#ifdef MOZ_MF_CDM
|
#ifdef MOZ_WMF_CDM
|
||||||
static_cast<MFCDMParent*>(actor)->Destroy();
|
static_cast<MFCDMParent*>(actor)->Destroy();
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ if CONFIG["MOZ_WMF_MEDIA_ENGINE"]:
|
||||||
"../platforms/wmf",
|
"../platforms/wmf",
|
||||||
]
|
]
|
||||||
|
|
||||||
if CONFIG["MOZ_MF_CDM"]:
|
if CONFIG["MOZ_WMF_CDM"]:
|
||||||
IPDL_SOURCES += [
|
IPDL_SOURCES += [
|
||||||
"PMFCDM.ipdl",
|
"PMFCDM.ipdl",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -10157,7 +10157,7 @@
|
||||||
# Enable PlayReady DRM for EME
|
# Enable PlayReady DRM for EME
|
||||||
- name: media.eme.playready.enabled
|
- name: media.eme.playready.enabled
|
||||||
type: RelaxedAtomicBool
|
type: RelaxedAtomicBool
|
||||||
#if defined(MOZ_MF_CDM) && defined(NIGHTLY_BUILD)
|
#if defined(MOZ_WMF_CDM) && defined(NIGHTLY_BUILD)
|
||||||
value: false # TODO: enable this when ready to play.
|
value: false # TODO: enable this when ready to play.
|
||||||
#else
|
#else
|
||||||
value: false
|
value: false
|
||||||
|
|
|
||||||
|
|
@ -670,19 +670,19 @@ set_define("MOZ_WMF", wmf)
|
||||||
set_config("MOZ_WMF_MEDIA_ENGINE", True, when=wmfmediaengine)
|
set_config("MOZ_WMF_MEDIA_ENGINE", True, when=wmfmediaengine)
|
||||||
set_define("MOZ_WMF_MEDIA_ENGINE", True, when=wmfmediaengine)
|
set_define("MOZ_WMF_MEDIA_ENGINE", True, when=wmfmediaengine)
|
||||||
|
|
||||||
# PlayReady CDM support
|
# Media Foundation CDM support
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
option("--disable-mf-cdm", help="Disable support for Media Foundation CDM")
|
option("--disable-wmf-cdm", help="Disable support for Media Foundation CDM")
|
||||||
|
|
||||||
|
|
||||||
@depends("--enable-mf-cdm", when=wmfmediaengine)
|
@depends("--enable-wmf-cdm", when=wmfmediaengine)
|
||||||
def mfcdm(value):
|
def wmfcdm(value):
|
||||||
if value:
|
if value:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
set_config("MOZ_MF_CDM", True, when=mfcdm)
|
set_config("MOZ_WMF_CDM", True, when=wmfcdm)
|
||||||
set_define("MOZ_MF_CDM", True, when=mfcdm)
|
set_define("MOZ_WMF_CDM", True, when=wmfcdm)
|
||||||
|
|
||||||
# FFmpeg H264/AAC Decoding Support
|
# FFmpeg H264/AAC Decoding Support
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue