mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
Issue #2301 - Make Gecko Media Plugins optional when not building EME or WebRTC
Co-authored-by: Moonchild <moonchild@palemoon.org>
This commit is contained in:
parent
57020c1f59
commit
9e7d1492e6
54 changed files with 314 additions and 30 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue