diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-08-13 22:45:09 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-03 23:42:52 +0100 |
commit | 99118e38e1a9f2ba3b48ed61ab7cc85610c9712f (patch) | |
tree | 6b7ef33a5b1546a82689437e33ff95e9cf8ff79f /dom/media/gmp/GMPParent.cpp | |
parent | a595451104a9ea155703899ab8fbc9f37547bcd9 (diff) | |
download | UXP-99118e38e1a9f2ba3b48ed61ab7cc85610c9712f.tar UXP-99118e38e1a9f2ba3b48ed61ab7cc85610c9712f.tar.gz UXP-99118e38e1a9f2ba3b48ed61ab7cc85610c9712f.tar.lz UXP-99118e38e1a9f2ba3b48ed61ab7cc85610c9712f.tar.xz UXP-99118e38e1a9f2ba3b48ed61ab7cc85610c9712f.zip |
Issue #26 Part 2a: make more EME code conditional.
- Exclude missed MediaKey functions and CDMProxy code.
- Exclude EME APIs frm being built (webidl change)
- Fix tests in --disable-eme state
Diffstat (limited to 'dom/media/gmp/GMPParent.cpp')
-rw-r--r-- | dom/media/gmp/GMPParent.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp index 234ed5c05..a0027c6f8 100644 --- a/dom/media/gmp/GMPParent.cpp +++ b/dom/media/gmp/GMPParent.cpp @@ -30,8 +30,10 @@ using mozilla::ipc::GeckoChildProcessHost; #include "WMFDecoderModule.h" #endif +#ifdef MOZ_EME #include "mozilla/dom/WidevineCDMManifestBinding.h" #include "widevine-adapter/WidevineAdapter.h" +#endif namespace mozilla { @@ -654,6 +656,7 @@ GMPParent::ReadGMPMetaData() return ReadGMPInfoFile(infoFile); } +#ifdef MOZ_EME // Maybe this is the Widevine adapted plugin? nsCOMPtr<nsIFile> manifestFile; rv = mDirectory->Clone(getter_AddRefs(manifestFile)); @@ -662,6 +665,9 @@ GMPParent::ReadGMPMetaData() } manifestFile->AppendRelativePath(NS_LITERAL_STRING("manifest.json")); return ReadChromiumManifestFile(manifestFile); +#else + return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__); +#endif } RefPtr<GenericPromise> @@ -757,6 +763,7 @@ GMPParent::ParseChromiumManifest(nsString aJSON) 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__); @@ -791,6 +798,10 @@ GMPParent::ParseChromiumManifest(nsString aJSON) #endif return GenericPromise::CreateAndResolve(true, __func__); +#else // !MOZ_EME + MOZ_ASSERT_UNREACHABLE("don't call me if EME isn't enabled"); + return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__); +#endif // !MOZ_EME } bool |