Add more backends
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
/// <summary>
|
||||
/// 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);
|
||||
|
||||
Reference in New Issue
Block a user