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:
Matheus Marinho 2023-08-31 12:07:34 -03:00 committed by roytam1
commit 9e7d1492e6
54 changed files with 314 additions and 30 deletions

View file

@ -7,15 +7,23 @@
#include "nsISupports.h"
#include "MediaResource.h"
#ifdef MOZ_GMP
#include "GMPService.h"
#endif
namespace mozilla {
NS_IMPL_ISUPPORTS0(BufferDecoder)
#ifdef MOZ_GMP
BufferDecoder::BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHelper)
#else
BufferDecoder::BufferDecoder(MediaResource* aResource)
#endif
: mResource(aResource)
#ifdef MOZ_GMP
, mCrashHelper(aCrashHelper)
#endif
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_COUNT_CTOR(BufferDecoder);
@ -67,10 +75,12 @@ BufferDecoder::GetOwner() const
return nullptr;
}
#ifdef MOZ_GMP
already_AddRefed<GMPCrashHelper>
BufferDecoder::GetCrashHelper()
{
return do_AddRef(mCrashHelper);
}
#endif
} // namespace mozilla