summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-04-21 01:33:40 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-04-21 01:33:40 -0500
commit53918edf762b539e2e0ece3bc844931bf2437cb6 (patch)
treea3f44ddd506802170281c8fcf4b71a2f75a73f82 /dom
parent25a9692606419e2827f1c9413831b92eb289fa74 (diff)
downloadaura-central-53918edf762b539e2e0ece3bc844931bf2437cb6.tar.gz
Issue #25 - Part 11: Remove EME from dom/media/(mediasource|platforms)
Diffstat (limited to 'dom')
-rw-r--r--dom/media/mediasource/TrackBuffersManager.cpp36
-rw-r--r--dom/media/platforms/PDMFactory.cpp14
-rw-r--r--dom/media/platforms/PDMFactory.h13
3 files changed, 0 insertions, 63 deletions
diff --git a/dom/media/mediasource/TrackBuffersManager.cpp b/dom/media/mediasource/TrackBuffersManager.cpp
index 8663c1a8f..da21e0b39 100644
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -58,34 +58,6 @@ AppendStateToStr(SourceBufferAttributes::AppendState aState)
static Atomic<uint32_t> sStreamSourceID(0u);
-#ifdef MOZ_EME
-class DispatchKeyNeededEvent : public Runnable {
-public:
- DispatchKeyNeededEvent(AbstractMediaDecoder* aDecoder,
- nsTArray<uint8_t>& aInitData,
- const nsString& aInitDataType)
- : mDecoder(aDecoder)
- , mInitData(aInitData)
- , mInitDataType(aInitDataType)
- {
- }
- NS_IMETHOD Run() override {
- // Note: Null check the owner, as the decoder could have been shutdown
- // since this event was dispatched.
- MediaDecoderOwner* owner = mDecoder->GetOwner();
- if (owner) {
- owner->DispatchEncrypted(mInitData, mInitDataType);
- }
- mDecoder = nullptr;
- return NS_OK;
- }
-private:
- RefPtr<AbstractMediaDecoder> mDecoder;
- nsTArray<uint8_t> mInitData;
- nsString mInitDataType;
-};
-#endif // MOZ_EME
-
TrackBuffersManager::TrackBuffersManager(MediaSourceDecoder* aParentDecoder,
const nsACString& aType)
: mInputBuffer(new MediaByteBuffer)
@@ -1101,14 +1073,6 @@ TrackBuffersManager::OnDemuxerInitDone(nsresult)
UniquePtr<EncryptionInfo> crypto = mInputDemuxer->GetCrypto();
if (crypto && crypto->IsEncrypted()) {
-#ifdef MOZ_EME
- // Try and dispatch 'encrypted'. Won't go if ready state still HAVE_NOTHING.
- for (uint32_t i = 0; i < crypto->mInitDatas.Length(); i++) {
- NS_DispatchToMainThread(
- new DispatchKeyNeededEvent(mParentDecoder, crypto->mInitDatas[i].mInitData,
- crypto->mInitDatas[i].mType));
- }
-#endif
info.mCrypto = *crypto;
// We clear our crypto init data array, so the MediaFormatReader will
// not emit an encrypted event for the same init data again.
diff --git a/dom/media/platforms/PDMFactory.cpp b/dom/media/platforms/PDMFactory.cpp
index 214fc80c8..82bf0f50a 100644
--- a/dom/media/platforms/PDMFactory.cpp
+++ b/dom/media/platforms/PDMFactory.cpp
@@ -31,11 +31,6 @@
#include "AgnosticDecoderModule.h"
-#ifdef MOZ_EME
-#include "mozilla/CDMProxy.h"
-#include "EMEDecoderModule.h"
-#endif
-
#include "DecoderDoctorDiagnostics.h"
#include "MP4Decoder.h"
@@ -427,13 +422,4 @@ 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 a13c99ac0..395eea3d7 100644
--- a/dom/media/platforms/PDMFactory.h
+++ b/dom/media/platforms/PDMFactory.h
@@ -11,10 +11,6 @@
#include "mozilla/Function.h"
#include "mozilla/StaticMutex.h"
-#ifdef MOZ_EME
-class CDMProxy;
-#endif
-
namespace mozilla {
class DecoderDoctorDiagnostics;
@@ -40,15 +36,6 @@ 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 const int kYUV400 = 0;
static const int kYUV420 = 1;
static const int kYUV422 = 2;