diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-05 22:32:52 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-05 22:32:52 +0100 |
commit | 4c9689f68077a046e26d2a1ff22959f95d679f54 (patch) | |
tree | 9ffa42820cd4df74fa6070a06b5effc4826792fa /dom | |
parent | d44c61bf60f82d8cc8389674fe61e6536087c273 (diff) | |
download | uxp-4c9689f68077a046e26d2a1ff22959f95d679f54.tar.gz |
Issue #26 - Part 2c: Remove dependence on gmp/widevine-adapter/*
Diffstat (limited to 'dom')
-rw-r--r-- | dom/media/gmp/GMPChild.cpp | 6 | ||||
-rw-r--r-- | dom/media/gmp/GMPParent.cpp | 2 | ||||
-rw-r--r-- | dom/media/gmp/moz.build | 8 |
3 files changed, 11 insertions, 5 deletions
diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp index 14b06cc726..fa6f2f4c83 100644 --- a/dom/media/gmp/GMPChild.cpp +++ b/dom/media/gmp/GMPChild.cpp @@ -22,7 +22,9 @@ #include "GMPUtils.h" #include "prio.h" #include "base/task.h" +#ifdef MOZ_EME #include "widevine-adapter/WidevineAdapter.h" +#endif using namespace mozilla::ipc; @@ -254,9 +256,13 @@ GMPChild::AnswerStartPlugin(const nsString& aAdapter) return false; } +#ifdef MOZ_EME bool isWidevine = aAdapter.EqualsLiteral("widevine"); GMPAdapter* adapter = (isWidevine) ? new WidevineAdapter() : nullptr; +#else + GMPAdapter* adapter = nullptr; +#endif if (!mGMPLoader->Load(libPath.get(), libPath.Length(), mNodeId.BeginWriting(), diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp index a0027c6f81..84603e973b 100644 --- a/dom/media/gmp/GMPParent.cpp +++ b/dom/media/gmp/GMPParent.cpp @@ -760,10 +760,10 @@ GMPParent::ReadChromiumManifestFile(nsIFile* aFile) RefPtr<GenericPromise> GMPParent::ParseChromiumManifest(nsString aJSON) { +#ifdef MOZ_EME LOGD("%s: for '%s'", __FUNCTION__, NS_LossyConvertUTF16toASCII(aJSON).get()); MOZ_ASSERT(NS_IsMainThread()); -#ifdef MOZ_EME mozilla::dom::WidevineCDMManifest m; if (!m.Init(aJSON)) { return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__); diff --git a/dom/media/gmp/moz.build b/dom/media/gmp/moz.build index f7b012733d..79de6e1d96 100644 --- a/dom/media/gmp/moz.build +++ b/dom/media/gmp/moz.build @@ -128,10 +128,10 @@ if CONFIG['MOZ_EME']: 'GMPCDMProxy.cpp', ] -DIRS += [ - 'rlz', - 'widevine-adapter', -] +DIRS += ['rlz'] + +if CONFIG['MOZ_EME']: + DIRS += ['widevine-adapter'] IPDL_SOURCES += [ 'GMPTypes.ipdlh', |