diff --git a/Source/Engine/Video/Video.Build.cs b/Source/Engine/Video/Video.Build.cs index f2368329c..a30105f8c 100644 --- a/Source/Engine/Video/Video.Build.cs +++ b/Source/Engine/Video/Video.Build.cs @@ -34,6 +34,18 @@ public class Video : EngineModule options.OutputFiles.Add("mfreadwrite.lib"); options.OutputFiles.Add("mfuuid.lib"); break; + case TargetPlatform.PS4: + options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Video")); + options.CompileEnv.PreprocessorDefinitions.Add("VIDEO_API_PS4"); + break; + case TargetPlatform.PS5: + options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS5", "Engine", "Video")); + options.CompileEnv.PreprocessorDefinitions.Add("VIDEO_API_PS5"); + break; + case TargetPlatform.Switch: + options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "Switch", "Engine", "Video")); + options.CompileEnv.PreprocessorDefinitions.Add("VIDEO_API_SWITCH"); + break; } } diff --git a/Source/Engine/Video/Video.cpp b/Source/Engine/Video/Video.cpp index 7af4caedf..6b98941ff 100644 --- a/Source/Engine/Video/Video.cpp +++ b/Source/Engine/Video/Video.cpp @@ -22,6 +22,15 @@ #if VIDEO_API_MF #include "MF/VideoBackendMF.h" #endif +#if VIDEO_API_PS4 +#include "Platforms/PS4/Engine/Video/VideoBackendPS4.h" +#endif +#if VIDEO_API_PS5 +#include "Platforms/PS5/Engine/Video/VideoBackendPS5.h" +#endif +#if VIDEO_API_SWITCH +#include "Platforms/Switch/Engine/Video/VideoBackendSwitch.h" +#endif /// /// Video frame upload task to the GPU. @@ -200,6 +209,15 @@ bool Video::CreatePlayerBackend(const VideoBackendPlayerInfo& info, VideoBackend #if VIDEO_API_MF TRY_USE_BACKEND(VideoBackendMF); #endif +#if VIDEO_API_PS4 + TRY_USE_BACKEND(VideoBackendPS4); +#endif +#if VIDEO_API_PS5 + TRY_USE_BACKEND(VideoBackendPS5); +#endif +#if VIDEO_API_SWITCH + TRY_USE_BACKEND(VideoBackendSwitch); +#endif #undef TRY_USE_BACKEND LOG(Error, "Failed to setup Video playback backend for '{}'", info.Url);