mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +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
|
|
@ -25,7 +25,9 @@
|
|||
#include "IMFYCbCrImage.h"
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#ifdef MOZ_GMP
|
||||
#include "GMPUtils.h" // For SplitAt. TODO: Move SplitAt to a central place.
|
||||
#endif
|
||||
#include "MP4Decoder.h"
|
||||
#include "VPXDecoder.h"
|
||||
#include "mozilla/SyncRunnable.h"
|
||||
|
|
@ -66,6 +68,23 @@ const CLSID CLSID_WebmMfVpxDec =
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifndef MOZ_GMP
|
||||
// Utility function only used when not building GMP
|
||||
// XXXMC: Perhaps make this available globally?
|
||||
void
|
||||
SplitAt(const char* aDelims,
|
||||
const nsACString& aInput,
|
||||
nsTArray<nsCString>& aOutTokens)
|
||||
{
|
||||
nsAutoCString str(aInput);
|
||||
char* end = str.BeginWriting();
|
||||
const char* start = nullptr;
|
||||
while (!!(start = NS_strtok(aDelims, &end))) {
|
||||
aOutTokens.AppendElement(nsCString(start));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
LayersBackend
|
||||
GetCompositorBackendType(layers::KnowsCompositor* aKnowsCompositor)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue