Files
Bryan sefcik b4a6e947d8 Ran IWYU on Public headers under Engine/Source/Runtime/...
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]
2022-07-20 11:31:36 -04:00

135 lines
3.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CodecPacket.h"
#include "Containers/Array.h"
#include "Containers/UnrealString.h"
#include "CoreMinimal.h"
#include "HAL/Platform.h"
//
// Windows only include
//
#if (PLATFORM_WINDOWS || PLATFORM_HOLOLENS)
#pragma warning(push)
#pragma warning(disable: 4005)
THIRD_PARTY_INCLUDES_START
#include "Microsoft/AllowMicrosoftPlatformTypes.h"
#include "Microsoft/PreWindowsApi.h"
#include <d3d11.h>
#include <mfobjects.h>
#include <mftransform.h>
#include <mfapi.h>
#include <mferror.h>
#include <mfidl.h>
#include <codecapi.h>
#include <shlwapi.h>
#include <mfreadwrite.h>
#include <d3d11_1.h>
#include <d3d12.h>
#include <dxgi1_4.h>
#include "Microsoft/PostWindowsApi.h"
#include "Microsoft/HideMicrosoftPlatformTypes.h"
THIRD_PARTY_INCLUDES_END
#endif // PLATFORM_WINDOWS
#ifndef WMFMEDIA_SUPPORTED_PLATFORM
#define WMFMEDIA_SUPPORTED_PLATFORM (PLATFORM_WINDOWS && (WINVER >= 0x0600 /*Vista*/) && !UE_SERVER)
#endif
#if PLATFORM_WINDOWS
struct ID3D11DeviceChild;
#endif
namespace AVEncoder
{
const int64 TimeStampNone = 0x7fffffffll;
enum class EVideoFrameFormat
{
Undefined, // (not-yet) defined format
YUV420P, // Planar YUV420 format in CPU memory
D3D11_R8G8B8A8_UNORM, //
D3D12_R8G8B8A8_UNORM, //
CUDA_R8G8B8A8_UNORM,
VULKAN_R8G8B8A8_UNORM,
};
enum class EH264Profile
{
UNKNOWN,
CONSTRAINED_BASELINE,
BASELINE,
MAIN,
CONSTRAINED_HIGH,
HIGH,
};
inline FString ToString(EVideoFrameFormat Format)
{
switch (Format)
{
case EVideoFrameFormat::YUV420P:
return FString("EVideoFrameFormat::YUV420P");
case EVideoFrameFormat::D3D11_R8G8B8A8_UNORM:
return FString("EVideoFrameFormat::D3D11_R8G8B8A8_UNORM");
case EVideoFrameFormat::D3D12_R8G8B8A8_UNORM:
return FString("EVideoFrameFormat::D3D12_R8G8B8A8_UNORM");
case EVideoFrameFormat::CUDA_R8G8B8A8_UNORM:
return FString("EVideoFrameFormat::CUDA_R8G8B8A8_UNORM");
case EVideoFrameFormat::VULKAN_R8G8B8A8_UNORM:
return FString("EVideoFrameFormat::VULKAN_R8G8B8A8_UNORM");
case EVideoFrameFormat::Undefined:
default:
return FString("EVideoFrameFormat::Undefined");
}
}
enum class ECodecType
{
Undefined,
H264,
MPEG4,
VP8,
};
// TODO: make enums
const uint32 H264Profile_ConstrainedBaseline = 1 << 0;
const uint32 H264Profile_Baseline = 1 << 1;
const uint32 H264Profile_Main = 1 << 2;
const uint32 H264Profile_ConstrainedHigh = 1 << 3;
const uint32 H264Profile_High = 1 << 4;
struct FVideoEncoderInfo
{
uint32 ID = 0;
ECodecType CodecType = ECodecType::Undefined;
uint32 MaxWidth = 0;
uint32 MaxHeight = 0;
TArray<EVideoFrameFormat> SupportedInputFormats;
struct
{
uint32 SupportedProfiles = 0;
uint32 MinLevel = 0;
uint32 MaxLevel = 0;
} H264;
};
struct FVideoDecoderInfo
{
uint32 ID = 0;
ECodecType CodecType = ECodecType::Undefined;
uint32 MaxWidth = 0;
uint32 MaxHeight = 0;
};
#if PLATFORM_WINDOWS
void DebugSetD3D11ObjectName(ID3D11DeviceChild* InD3DObject, const char* InName);
#endif
} /* namespace AVEncoder */