2023-10-22 11:46:19 CST W43D0

This commit is contained in:
aggresss
2023-10-22 11:46:19 +08:00
parent 0f95831c39
commit e163918619
62 changed files with 2326 additions and 355 deletions

View File

@@ -0,0 +1,28 @@
//go:build ffmpeg_hw_vulkan
package ffmpeg
/*
#include <libavutil/hwcontext_vulkan.h>
*/
import "C"
// AVVulkanDeviceContext
type AVVulkanDeviceContext C.struct_AVVulkanDeviceContext
// AVVulkanFramesContext
type AVVulkanFramesContext C.struct_AVVulkanFramesContext
// AVVkFrame
type AVVkFrame C.struct_AVVkFrame
// AvVkFrameAlloc allocates a single AVVkFrame and initializes everything as 0.
func AvVkFrameAlloc() *AVVkFrame {
return (*AVVkFrame)(C.av_vk_frame_alloc())
}
// AvVkfmtFromPixfmt returns the format of each image up to the number of planes for a given sw_format.
// Returns NULL on unsupported formats.
func AvVkfmtFromPixfmt(p AVPixelFormat) *AVVkFrame {
return (*AVVkFrame)(C.av_vkfmt_from_pixfmt((C.enum_AVPixelFormat)(p)))
}