mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Improve capture performance on amd/intel when using monitor capture: capture display frame using purely vaapi unless the monitor is rotated
This commit is contained in:
@@ -31,6 +31,7 @@ typedef void* EGLSurface;
|
||||
typedef void* EGLContext;
|
||||
typedef void* EGLClientBuffer;
|
||||
typedef void* EGLImage;
|
||||
typedef void* EGLImageKHR;
|
||||
typedef void *GLeglImageOES;
|
||||
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
@@ -138,6 +139,8 @@ typedef void(*__GLXextFuncPtr)(void);
|
||||
#define GL_COMPILE_STATUS 0x8B81
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
|
||||
typedef unsigned int (*FUNC_eglExportDMABUFImageQueryMESA)(EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, uint64_t *modifiers);
|
||||
typedef unsigned int (*FUNC_eglExportDMABUFImageMESA)(EGLDisplay dpy, EGLImageKHR image, int *fds, int32_t *strides, int32_t *offsets);
|
||||
typedef void (*FUNC_glEGLImageTargetTexture2DOES)(unsigned int target, GLeglImageOES image);
|
||||
typedef GLXContext (*FUNC_glXCreateContextAttribsARB)(Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
||||
typedef void (*FUNC_glXSwapIntervalEXT)(Display * dpy, GLXDrawable drawable, int interval);
|
||||
@@ -235,6 +238,8 @@ struct gsr_egl {
|
||||
unsigned int (*eglBindAPI)(unsigned int api);
|
||||
__eglMustCastToProperFunctionPointerType (*eglGetProcAddress)(const char *procname);
|
||||
|
||||
FUNC_eglExportDMABUFImageQueryMESA eglExportDMABUFImageQueryMESA;
|
||||
FUNC_eglExportDMABUFImageMESA eglExportDMABUFImageMESA;
|
||||
FUNC_glEGLImageTargetTexture2DOES glEGLImageTargetTexture2DOES;
|
||||
FUNC_eglQueryDisplayAttribEXT eglQueryDisplayAttribEXT;
|
||||
FUNC_eglQueryDeviceStringEXT eglQueryDeviceStringEXT;
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct AVCodecContext AVCodecContext;
|
||||
typedef struct AVFrame AVFrame;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
int name_len;
|
||||
@@ -44,5 +47,7 @@ int create_directory_recursive(char *path);
|
||||
|
||||
/* |img_attr| needs to be at least 44 in size */
|
||||
void setup_dma_buf_attrs(intptr_t *img_attr, uint32_t format, uint32_t width, uint32_t height, const int *fds, const uint32_t *offsets, const uint32_t *pitches, const uint64_t *modifiers, int num_planes, bool use_modifier);
|
||||
bool video_codec_context_is_vaapi(AVCodecContext *video_codec_context);
|
||||
bool vaapi_copy_drm_planes_to_video_surface(AVCodecContext *video_codec_context, AVFrame *video_frame, int x, int y, uint32_t format, uint32_t width, uint32_t height, const int *fds, const uint32_t *offsets, const uint32_t *pitches, const uint64_t *modifiers, int num_planes);
|
||||
|
||||
#endif /* GSR_UTILS_H */
|
||||
|
||||
Reference in New Issue
Block a user