mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Add vulkan video encoding option (-k h264_vulkan). WIP, not fully hardware accelerated yet
This commit is contained in:
8
include/codec_query/vulkan.h
Normal file
8
include/codec_query/vulkan.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef GSR_CODEC_QUERY_VULKAN_H
|
||||
#define GSR_CODEC_QUERY_VULKAN_H
|
||||
|
||||
#include "codec_query.h"
|
||||
|
||||
bool gsr_get_supported_video_codecs_vulkan(gsr_supported_video_codecs *video_codecs, const char *card_path, bool cleanup);
|
||||
|
||||
#endif /* GSR_CODEC_QUERY_VULKAN_H */
|
||||
@@ -313,6 +313,9 @@ struct gsr_egl {
|
||||
void (*glUniform2f)(int location, float v0, float v1);
|
||||
void (*glDebugMessageCallback)(GLDEBUGPROC callback, const void *userParam);
|
||||
void (*glScissor)(int x, int y, int width, int height);
|
||||
void (*glReadPixels)(int x, int y, int width, int height, unsigned int format, unsigned int type, void *pixels);
|
||||
void* (*glMapBuffer)(unsigned int target, unsigned int access);
|
||||
unsigned char (*glUnmapBuffer)(unsigned int target);
|
||||
};
|
||||
|
||||
bool gsr_egl_load(gsr_egl *self, Display *dpy, bool wayland, bool is_monitor_capture);
|
||||
|
||||
@@ -10,7 +10,7 @@ typedef struct AVFrame AVFrame;
|
||||
|
||||
struct gsr_video_encoder {
|
||||
bool (*start)(gsr_video_encoder *encoder, AVCodecContext *video_codec_context, AVFrame *frame);
|
||||
void (*copy_textures_to_frame)(gsr_video_encoder *encoder, AVFrame *frame); /* Can be NULL */
|
||||
void (*copy_textures_to_frame)(gsr_video_encoder *encoder, AVFrame *frame, gsr_color_conversion *color_conversion); /* Can be NULL */
|
||||
/* |textures| should be able to fit 2 elements */
|
||||
void (*get_textures)(gsr_video_encoder *encoder, unsigned int *textures, int *num_textures, gsr_destination_color *destination_color);
|
||||
void (*destroy)(gsr_video_encoder *encoder, AVCodecContext *video_codec_context);
|
||||
@@ -20,7 +20,7 @@ struct gsr_video_encoder {
|
||||
};
|
||||
|
||||
bool gsr_video_encoder_start(gsr_video_encoder *encoder, AVCodecContext *video_codec_context, AVFrame *frame);
|
||||
void gsr_video_encoder_copy_textures_to_frame(gsr_video_encoder *encoder, AVFrame *frame);
|
||||
void gsr_video_encoder_copy_textures_to_frame(gsr_video_encoder *encoder, AVFrame *frame, gsr_color_conversion *color_conversion);
|
||||
void gsr_video_encoder_get_textures(gsr_video_encoder *encoder, unsigned int *textures, int *num_textures, gsr_destination_color *destination_color);
|
||||
void gsr_video_encoder_destroy(gsr_video_encoder *encoder, AVCodecContext *video_codec_context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user