mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
Allow building testffmpeg without Vulkan support
This commit is contained in:
@@ -12,11 +12,13 @@
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_vulkan.h>
|
||||
|
||||
#include "testffmpeg_vulkan.h"
|
||||
|
||||
#ifdef FFMPEG_VULKAN_SUPPORT
|
||||
|
||||
#include <libavutil/hwcontext.h>
|
||||
#include <libavutil/hwcontext_vulkan.h>
|
||||
|
||||
#include "testffmpeg_vulkan.h"
|
||||
|
||||
#define VULKAN_FUNCTIONS() \
|
||||
VULKAN_GLOBAL_FUNCTION(vkCreateInstance) \
|
||||
VULKAN_GLOBAL_FUNCTION(vkEnumerateInstanceExtensionProperties) \
|
||||
@@ -966,3 +968,40 @@ void DestroyVulkanVideoContext(VulkanVideoContext *context)
|
||||
SDL_free(context);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
VulkanVideoContext *CreateVulkanVideoContext(SDL_Window *window)
|
||||
{
|
||||
SDL_SetError("testffmpeg not built with Vulkan support");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void SetupVulkanRenderProperties(VulkanVideoContext *context, SDL_PropertiesID props)
|
||||
{
|
||||
}
|
||||
|
||||
void SetupVulkanDeviceContextData(VulkanVideoContext *context, AVVulkanDeviceContext *ctx)
|
||||
{
|
||||
}
|
||||
|
||||
SDL_Texture *CreateVulkanVideoTexture(VulkanVideoContext *context, AVFrame *frame, SDL_Renderer *renderer, SDL_PropertiesID props)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int BeginVulkanFrameRendering(VulkanVideoContext *context, AVFrame *frame, SDL_Renderer *renderer)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int FinishVulkanFrameRendering(VulkanVideoContext *context, AVFrame *frame, SDL_Renderer *renderer)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
void DestroyVulkanVideoContext(VulkanVideoContext *context)
|
||||
{
|
||||
}
|
||||
|
||||
#endif // FFMPEG_VULKAN_SUPPORT
|
||||
|
||||
Reference in New Issue
Block a user