summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaDecoder.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-08-13 22:45:09 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-02-03 23:42:52 +0100
commit99118e38e1a9f2ba3b48ed61ab7cc85610c9712f (patch)
tree6b7ef33a5b1546a82689437e33ff95e9cf8ff79f /dom/media/MediaDecoder.cpp
parenta595451104a9ea155703899ab8fbc9f37547bcd9 (diff)
downloadUXP-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/MediaDecoder.cpp')
-rw-r--r--dom/media/MediaDecoder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp
index 223c59c3b..0cce91ccb 100644
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -387,7 +387,9 @@ MediaDecoder::MediaDecoder(MediaDecoderOwner* aOwner)
, mLogicalPosition(0.0)
, mDuration(std::numeric_limits<double>::quiet_NaN())
, mResourceCallback(new ResourceCallback())
+#ifdef MOZ_EME
, mCDMProxyPromise(mCDMProxyPromiseHolder.Ensure(__func__))
+#endif
, mIgnoreProgressData(false)
, mInfiniteStream(false)
, mOwner(aOwner)
@@ -472,7 +474,9 @@ MediaDecoder::Shutdown()
mResourceCallback->Disconnect();
+#ifdef MOZ_EME
mCDMProxyPromiseHolder.RejectIfExists(true, __func__);
+#endif
DiscardOngoingSeekIfExists();
@@ -1537,6 +1541,7 @@ MediaDecoder::CanPlayThrough()
return GetStatistics().CanPlayThrough();
}
+#ifdef MOZ_EME
RefPtr<MediaDecoder::CDMProxyPromise>
MediaDecoder::RequestCDMProxy() const
{
@@ -1551,6 +1556,7 @@ MediaDecoder::SetCDMProxy(CDMProxy* aProxy)
mCDMProxyPromiseHolder.ResolveIfExists(aProxy, __func__);
}
+#endif
bool
MediaDecoder::IsOpusEnabled()