diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-08-13 22:45:09 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:29:16 +0200 |
commit | 37e3135bc5cf853f94e9d0d9ba706277a25db928 (patch) | |
tree | 5b7154274de8ed438765a7ef44c4bc0eb2b8249f /dom/media/platforms | |
parent | 259bd2e9770625fb4054298874a0200ad17b4354 (diff) | |
download | UXP-37e3135bc5cf853f94e9d0d9ba706277a25db928.tar UXP-37e3135bc5cf853f94e9d0d9ba706277a25db928.tar.gz UXP-37e3135bc5cf853f94e9d0d9ba706277a25db928.tar.lz UXP-37e3135bc5cf853f94e9d0d9ba706277a25db928.tar.xz UXP-37e3135bc5cf853f94e9d0d9ba706277a25db928.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/platforms')
-rw-r--r-- | dom/media/platforms/PDMFactory.cpp | 7 | ||||
-rw-r--r-- | dom/media/platforms/PDMFactory.h | 4 | ||||
-rw-r--r-- | dom/media/platforms/moz.build | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/dom/media/platforms/PDMFactory.cpp b/dom/media/platforms/PDMFactory.cpp index 5bfdcffb7..6e7241c46 100644 --- a/dom/media/platforms/PDMFactory.cpp +++ b/dom/media/platforms/PDMFactory.cpp @@ -24,7 +24,6 @@ #endif #include "GMPDecoderModule.h" -#include "mozilla/CDMProxy.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/SharedThreadPool.h" #include "mozilla/StaticPtr.h" @@ -37,7 +36,11 @@ #include "H264Converter.h" #include "AgnosticDecoderModule.h" + +#ifdef MOZ_EME +#include "mozilla/CDMProxy.h" #include "EMEDecoderModule.h" +#endif #include "DecoderDoctorDiagnostics.h" @@ -450,11 +453,13 @@ PDMFactory::GetDecoder(const TrackInfo& aTrackInfo, return pdm.forget(); } +#ifdef MOZ_EME void PDMFactory::SetCDMProxy(CDMProxy* aProxy) { RefPtr<PDMFactory> m = new PDMFactory(); mEMEPDM = new EMEDecoderModule(aProxy, m); } +#endif } // namespace mozilla diff --git a/dom/media/platforms/PDMFactory.h b/dom/media/platforms/PDMFactory.h index 94be7e928..2b43fa1ab 100644 --- a/dom/media/platforms/PDMFactory.h +++ b/dom/media/platforms/PDMFactory.h @@ -11,7 +11,9 @@ #include "mozilla/Function.h" #include "mozilla/StaticMutex.h" +#ifdef MOZ_EME class CDMProxy; +#endif namespace mozilla { @@ -38,12 +40,14 @@ public: bool Supports(const TrackInfo& aTrackInfo, DecoderDoctorDiagnostics* aDiagnostics) const; +#ifdef MOZ_EME // Creates a PlatformDecoderModule that uses a CDMProxy to decrypt or // decrypt-and-decode EME encrypted content. If the CDM only decrypts and // does not decode, we create a PDM and use that to create MediaDataDecoders // that we use on on aTaskQueue to decode the decrypted stream. // This is called on the decode task queue. void SetCDMProxy(CDMProxy* aProxy); +#endif static constexpr int kYUV400 = 0; static constexpr int kYUV420 = 1; diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build index f5fb72c5d..c46d52e3f 100644 --- a/dom/media/platforms/moz.build +++ b/dom/media/platforms/moz.build @@ -30,11 +30,13 @@ UNIFIED_SOURCES += [ ] DIRS += [ - 'agnostic/eme', 'agnostic/gmp', 'omx' ] +if CONFIG['MOZ_EME']: + DIRS += ['agnostic/eme'] + if CONFIG['MOZ_WMF']: DIRS += [ 'wmf' ]; |