testffmpeg: added support for Vulkan rendering

This commit is contained in:
Sam Lantinga
2024-03-02 10:05:38 -08:00
parent 48471f7dbd
commit dbec2150d0
4 changed files with 1088 additions and 20 deletions

22
test/testffmpeg_vulkan.h Normal file
View File

@@ -0,0 +1,22 @@
/*
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely.
*/
#include <libavutil/hwcontext_vulkan.h>
typedef struct VulkanVideoContext VulkanVideoContext;
VulkanVideoContext *CreateVulkanVideoContext(SDL_Window *window);
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);
void DestroyVulkanVideoContext(VulkanVideoContext *context);