Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-09-14 10:49:05 +08:00
commit 0c6e087291
55 changed files with 320 additions and 34 deletions

View file

@ -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)
{