mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-05-07 07:16:21 +09:00
Implement vulkan video capture (h264, hevc and av1)
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
|
||||
#include "codec_query.h"
|
||||
|
||||
bool gsr_get_supported_video_codecs_vulkan(gsr_supported_video_codecs *video_codecs, const char *card_path, bool cleanup);
|
||||
bool gsr_get_supported_video_codecs_vulkan(gsr_supported_video_codecs *video_codecs, const char *card_path, int *device_index_ret, bool cleanup);
|
||||
|
||||
#endif /* GSR_CODEC_QUERY_VULKAN_H */
|
||||
|
||||
@@ -51,6 +51,11 @@ typedef enum {
|
||||
GSR_VIDEO_CODEC_VP9,
|
||||
GSR_VIDEO_CODEC_H264_VULKAN,
|
||||
GSR_VIDEO_CODEC_HEVC_VULKAN,
|
||||
GSR_VIDEO_CODEC_HEVC_HDR_VULKAN,
|
||||
GSR_VIDEO_CODEC_HEVC_10BIT_VULKAN,
|
||||
GSR_VIDEO_CODEC_AV1_VULKAN,
|
||||
GSR_VIDEO_CODEC_AV1_HDR_VULKAN,
|
||||
GSR_VIDEO_CODEC_AV1_10BIT_VULKAN,
|
||||
} gsr_video_codec;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -169,6 +169,9 @@ typedef void (*FUNC_glTexStorageMem2DEXT)(unsigned int target, int levels, unsig
|
||||
typedef void (*FUNC_glBufferStorageMemEXT)(unsigned int target, ssize_t size, unsigned int memory, uint64_t offset);
|
||||
typedef void (*FUNC_glNamedBufferStorageMemEXT)(unsigned int buffer, ssize_t size, unsigned int memory, uint64_t offset);
|
||||
typedef void (*FUNC_glMemoryObjectParameterivEXT)(unsigned int memoryObject, unsigned int pname, const int *params);
|
||||
typedef void (*FUNC_glGenSemaphoresEXT)(int n, unsigned int *semaphores);
|
||||
typedef void (*FUNC_glImportSemaphoreFdEXT)(unsigned int semaphore, unsigned int handleType, int fd);
|
||||
typedef void (*FUNC_glSignalSemaphoreEXT)(unsigned int semaphore, unsigned int numBufferBarriers, const unsigned int *buffers, unsigned int numTextureBarriers, const unsigned int *textures, const unsigned int *dstLayouts);
|
||||
|
||||
typedef enum {
|
||||
GSR_GL_CONTEXT_TYPE_EGL,
|
||||
@@ -195,6 +198,7 @@ struct gsr_egl {
|
||||
gsr_gpu_info gpu_info;
|
||||
|
||||
char card_path[128];
|
||||
int vulkan_device_index;
|
||||
|
||||
int32_t (*eglGetError)(void);
|
||||
EGLDisplay (*eglGetDisplay)(EGLNativeDisplayType display_id);
|
||||
@@ -226,6 +230,9 @@ struct gsr_egl {
|
||||
FUNC_glBufferStorageMemEXT glBufferStorageMemEXT;
|
||||
FUNC_glNamedBufferStorageMemEXT glNamedBufferStorageMemEXT;
|
||||
FUNC_glMemoryObjectParameterivEXT glMemoryObjectParameterivEXT;
|
||||
FUNC_glGenSemaphoresEXT glGenSemaphoresEXT;
|
||||
FUNC_glImportSemaphoreFdEXT glImportSemaphoreFdEXT;
|
||||
FUNC_glSignalSemaphoreEXT glSignalSemaphoreEXT;
|
||||
|
||||
__GLXextFuncPtr (*glXGetProcAddress)(const unsigned char *procName);
|
||||
GLXFBConfig* (*glXChooseFBConfig)(Display *dpy, int screen, const int *attribList, int *nitems);
|
||||
|
||||
Reference in New Issue
Block a user