Files
UnrealEngineUWP/Engine/Source/Runtime/AVEncoder/Private/AVEncoderCommon.h
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

77 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Stats/Stats.h"
#include "Logging/LogMacros.h"
#include "RHIStaticStates.h"
#include "HAL/ThreadSafeBool.h"
#include "HAL/ThreadSafeCounter.h"
#include "HAL/Thread.h"
#include "HAL/Event.h"
#include "Misc/ScopeExit.h"
#include "ShaderCore.h"
#include "ProfilingDebugging/CsvProfiler.h"
#include "RHI.h"
#include "RHIResources.h"
#include "ScreenRendering.h"
#include "CommonRenderResources.h"
DECLARE_LOG_CATEGORY_EXTERN(LogAVEncoder, Log, All);
CSV_DECLARE_CATEGORY_EXTERN(AVEncoder);
namespace AVEncoder
{
template<typename F>
inline void ExecuteRHICommand(F&& Functor)
{
FRHICommandList& RHICmdList = FRHICommandListExecutor::GetImmediateCommandList();
if (RHICmdList.Bypass())
{
Functor();
}
else
{
FRHICOMMAND_MACRO(FLocalRHICommand)
{
F Functor;
FLocalRHICommand(F InFunctor)
: Functor(MoveTemp(InFunctor))
{}
void Execute(FRHICommandListBase& CmdList)
{
Functor();
}
};
new (RHICmdList.AllocCommand<FLocalRHICommand>()) FLocalRHICommand(Functor);
}
}
// Settings specific to
struct FH264Settings
{
enum ERateControlMode
{
ConstQP,
VBR,
CBR
};
int QP = 20;
ERateControlMode RcMode = ERateControlMode::CBR;
};
bool ReadH264Setting(const FString& Name, const FString& Value, FH264Settings& OutSettings);
void ReadH264Settings(const TArray<TPair<FString, FString>>& Options, FH264Settings& OutSettings);
void CopyTextureImpl(const FTexture2DRHIRef& Src, FTexture2DRHIRef& Dst, FRHIGPUFence* GPUFence);
}