UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VideoCommon.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CodecPacket.h"
6#include "Containers/Array.h"
8#include "CoreMinimal.h"
9#include "HAL/Platform.h"
10
11//
12// Windows only include
13//
14#if (PLATFORM_WINDOWS)
15
16#pragma warning(push)
17#pragma warning(disable: 4005)
18
21#include <d3d11.h>
22#include <mfobjects.h>
23#include <mftransform.h>
24#include <mfapi.h>
25#include <mferror.h>
26#include <mfidl.h>
27#include <codecapi.h>
28#include <shlwapi.h>
29#include <mfreadwrite.h>
30#include <d3d11_1.h>
31#include <d3d12.h>
32#include <dxgi1_4.h>
35
36#endif // PLATFORM_WINDOWS
37
38#ifndef WMFMEDIA_SUPPORTED_PLATFORM
39 #define WMFMEDIA_SUPPORTED_PLATFORM (PLATFORM_WINDOWS && (WINVER >= 0x0600 /*Vista*/) && !UE_SERVER)
40#endif
41
42#if PLATFORM_WINDOWS
44#endif
45
46namespace AVEncoder
47{
48 const int64 TimeStampNone = 0x7fffffffll;
49
50 enum class UE_DEPRECATED(5.4, "AVEncoder has been deprecated. Please use the AVCodecs plugin family instead.") EVideoFrameFormat
51 {
52 Undefined, // (not-yet) defined format
53 YUV420P, // Planar YUV420 format in CPU memory
58 };
59
60 enum class UE_DEPRECATED(5.4, "AVEncoder has been deprecated. Please use the AVCodecs plugin family instead.") EH264Profile
61 {
62 UNKNOWN,
65 MAIN,
67 HIGH,
68 };
69
71 inline FString ToString(EVideoFrameFormat Format)
72 {
73 switch (Format)
74 {
75 case EVideoFrameFormat::YUV420P:
76 return FString("EVideoFrameFormat::YUV420P");
77 case EVideoFrameFormat::D3D11_R8G8B8A8_UNORM:
78 return FString("EVideoFrameFormat::D3D11_R8G8B8A8_UNORM");
79 case EVideoFrameFormat::D3D12_R8G8B8A8_UNORM:
80 return FString("EVideoFrameFormat::D3D12_R8G8B8A8_UNORM");
81 case EVideoFrameFormat::CUDA_R8G8B8A8_UNORM:
82 return FString("EVideoFrameFormat::CUDA_R8G8B8A8_UNORM");
83 case EVideoFrameFormat::VULKAN_R8G8B8A8_UNORM:
84 return FString("EVideoFrameFormat::VULKAN_R8G8B8A8_UNORM");
85 case EVideoFrameFormat::Undefined:
86 default:
87 return FString("EVideoFrameFormat::Undefined");
88 }
89 }
91
92 enum class UE_DEPRECATED(5.4, "AVEncoder has been deprecated. Please use the AVCodecs plugin family instead.") ECodecType
93 {
95 H264,
96 MPEG4,
97 VP8,
98 };
99
100 // TODO: make enums
103 const uint32 H264Profile_Main = 1 << 2;
105 const uint32 H264Profile_High = 1 << 4;
106
107 struct UE_DEPRECATED(5.4, "AVEncoder has been deprecated. Please use the AVCodecs plugin family instead.") FVideoEncoderInfo
108 {
109 uint32 ID = 0;
110 uint32 MaxWidth = 0;
111 uint32 MaxHeight = 0;
113 ECodecType CodecType = ECodecType::Undefined;
116
117 struct
118 {
120 uint32 MinLevel = 0;
121 uint32 MaxLevel = 0;
122 } H264;
123 };
124
125
126 struct UE_DEPRECATED(5.4, "AVEncoder has been deprecated. Please use the AVCodecs plugin family instead.") FVideoDecoderInfo
127 {
128 uint32 ID = 0;
129 uint32 MaxWidth = 0;
130 uint32 MaxHeight = 0;
131
133 ECodecType CodecType = ECodecType::Undefined;
135 };
136
137#if PLATFORM_WINDOWS
138 void DebugSetD3D11ObjectName(ID3D11DeviceChild* InD3DObject, const char* InName);
139#endif
140} /* namespace AVEncoder */
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const uint32 MaxHeight
Definition GameplayMediaEncoder.cpp:50
const uint32 MaxWidth
Definition GameplayMediaEncoder.cpp:49
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define THIRD_PARTY_INCLUDES_START
Definition GenericPlatformCompilerPreSetup.h:63
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
const uint32 H264Profile_ConstrainedHigh
Definition VideoCommon.h:104
const uint32 H264Profile_Baseline
Definition VideoCommon.h:102
const uint32 H264Profile_Main
Definition VideoCommon.h:103
const uint32 H264Profile_ConstrainedBaseline
Definition VideoCommon.h:101
const uint32 H264Profile_High
Definition VideoCommon.h:105
const int64 TimeStampNone
Definition VideoCommon.h:48
Definition Array.h:670
Definition AudioEncoder.cpp:7
Definition Voronoi.cpp:10