mirror of
https://github.com/qrtc/ffmpeg-dev-go.git
synced 2025-10-04 07:17:36 +08:00
2023-10-22 11:46:19 CST W43D0
This commit is contained in:
28
avutil_hwcontext_vulkan.go
Normal file
28
avutil_hwcontext_vulkan.go
Normal 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)))
|
||||
}
|
Reference in New Issue
Block a user