You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Headers are updated to contain any missing #includes needed to compile and #includes are sorted. Nothing is removed. #ushell-cherrypick of 21065896 by bryan.sefcik #preflight 62d4b1a5a6141b6adfb0c892 #jira #ROBOMERGE-OWNER: Bryan.sefcik #ROBOMERGE-AUTHOR: bryan.sefcik #ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824) #ROBOMERGE-CONFLICT from-shelf [CL 21181076 by Bryan sefcik in ue5-main branch]
55 lines
1.6 KiB
C++
55 lines
1.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/Array.h"
|
|
#include "HAL/Platform.h"
|
|
#include "Templates/Function.h"
|
|
#include "VideoDecoder.h"
|
|
|
|
#include <HAL/ThreadSafeBool.h>
|
|
|
|
class FThreadSafeCounter;
|
|
|
|
namespace AVEncoder
|
|
{
|
|
struct FVideoDecoderInfo;
|
|
|
|
class AVENCODER_API FVideoDecoderFactory
|
|
{
|
|
public:
|
|
static FVideoDecoderFactory& Get();
|
|
static void Debug_SetDontRegisterDefaultCodecs();
|
|
|
|
// --- decoder registry
|
|
|
|
// the callback type used to create a registered decoder
|
|
using CreateDecoderCallback = TFunction<FVideoDecoder*()>;
|
|
|
|
// register a decoder so that it can be iterated and created
|
|
void Register(const FVideoDecoderInfo& InInfo, const CreateDecoderCallback& InCreateDecoder);
|
|
|
|
// get a list of registered decoders
|
|
const TArray<FVideoDecoderInfo>& GetAvailable() const { return AvailableDecoders; }
|
|
bool GetInfo(uint32 InID, FVideoDecoderInfo& OutInfo) const;
|
|
|
|
// --- decoder creation
|
|
// create a decoder instance. If not nullptr it must be destroyed through invoking its Shutdown() method!
|
|
FVideoDecoder* Create(uint32 InID, const FVideoDecoder::FInit& InInit);
|
|
|
|
private:
|
|
FVideoDecoderFactory();
|
|
~FVideoDecoderFactory();
|
|
FVideoDecoderFactory(const FVideoDecoderFactory&) = delete;
|
|
FVideoDecoderFactory& operator=(const FVideoDecoderFactory&) = delete;
|
|
|
|
void RegisterDefaultCodecs();
|
|
|
|
static FThreadSafeCounter NextID;
|
|
static bool bDebugDontRegisterDefaultCodecs;
|
|
|
|
TArray<FVideoDecoderInfo> AvailableDecoders;
|
|
TArray<CreateDecoderCallback> CreateDecoders;
|
|
};
|
|
|
|
} /* namespace AVEncoder */ |