summaryrefslogtreecommitdiff
path: root/dom/media/webaudio/MediaBufferDecoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/webaudio/MediaBufferDecoder.cpp')
-rw-r--r--dom/media/webaudio/MediaBufferDecoder.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/dom/media/webaudio/MediaBufferDecoder.cpp b/dom/media/webaudio/MediaBufferDecoder.cpp
index 0d8593e937..2f74329d2c 100644
--- a/dom/media/webaudio/MediaBufferDecoder.cpp
+++ b/dom/media/webaudio/MediaBufferDecoder.cpp
@@ -24,7 +24,9 @@
#include "WebAudioUtils.h"
#include "mozilla/dom/Promise.h"
#include "nsPrintfCString.h"
+#ifdef MOZ_GMP
#include "GMPService.h"
+#endif
namespace mozilla {
@@ -180,6 +182,7 @@ MediaDecodeTask::Run()
return NS_OK;
}
+#ifdef MOZ_GMP
class BufferDecoderGMPCrashHelper : public GMPCrashHelper
{
public:
@@ -197,6 +200,7 @@ public:
private:
nsWeakPtr mParent;
};
+#endif
bool
MediaDecodeTask::CreateReader()
@@ -215,8 +219,12 @@ MediaDecodeTask::CreateReader()
mLength, principal, mContentType);
MOZ_ASSERT(!mBufferDecoder);
+#ifdef MOZ_GMP
mBufferDecoder = new BufferDecoder(resource,
new BufferDecoderGMPCrashHelper(mDecodeJob.mContext->GetParentObject()));
+#else
+ mBufferDecoder = new BufferDecoder(resource);
+#endif
// If you change this list to add support for new decoders, please consider
// updating HTMLMediaElement::CreateDecoder as well.