From a1d31a5cf0b90d3afabc57d5a6f4ccdfb1eeb054 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 21 Jul 2023 18:56:34 +0200 Subject: Fix capture not working on intel + wayland Ignore nouveau cards. Fix lag on start of recording on amd/intel by only loading egl once, on startup. --- include/capture/kms_cuda.h | 1 + include/capture/kms_vaapi.h | 1 + include/capture/nvfbc.h | 2 ++ include/capture/xcomposite_cuda.h | 2 ++ include/capture/xcomposite_vaapi.h | 2 ++ 5 files changed, 8 insertions(+) (limited to 'include/capture') diff --git a/include/capture/kms_cuda.h b/include/capture/kms_cuda.h index e34802e..b631226 100644 --- a/include/capture/kms_cuda.h +++ b/include/capture/kms_cuda.h @@ -8,6 +8,7 @@ typedef struct _XDisplay Display; typedef struct { + gsr_egl *egl; const char *display_to_capture; /* if this is "screen", then the entire x11 screen is captured (all displays). A copy is made of this */ gsr_gpu_info gpu_inf; const char *card_path; /* reference */ diff --git a/include/capture/kms_vaapi.h b/include/capture/kms_vaapi.h index e7bd652..77b292a 100644 --- a/include/capture/kms_vaapi.h +++ b/include/capture/kms_vaapi.h @@ -8,6 +8,7 @@ typedef struct _XDisplay Display; typedef struct { + gsr_egl *egl; const char *display_to_capture; /* if this is "screen", then the entire x11 screen is captured (all displays). A copy is made of this */ gsr_gpu_info gpu_inf; const char *card_path; /* reference */ diff --git a/include/capture/nvfbc.h b/include/capture/nvfbc.h index 431777b..5678473 100644 --- a/include/capture/nvfbc.h +++ b/include/capture/nvfbc.h @@ -2,12 +2,14 @@ #define GSR_CAPTURE_NVFBC_H #include "capture.h" +#include "../egl.h" #include "../vec2.h" typedef struct _XDisplay Display; typedef struct { Display *dpy; + gsr_egl *egl; const char *display_to_capture; /* if this is "screen", then the entire x11 screen is captured (all displays). A copy is made of this */ int fps; vec2i pos; diff --git a/include/capture/xcomposite_cuda.h b/include/capture/xcomposite_cuda.h index 20d358e..547a6f3 100644 --- a/include/capture/xcomposite_cuda.h +++ b/include/capture/xcomposite_cuda.h @@ -2,12 +2,14 @@ #define GSR_CAPTURE_XCOMPOSITE_CUDA_H #include "capture.h" +#include "../egl.h" #include "../vec2.h" #include typedef struct _XDisplay Display; typedef struct { + gsr_egl *egl; Window window; bool follow_focused; /* If this is set then |window| is ignored */ vec2i region_size; /* This is currently only used with |follow_focused| */ diff --git a/include/capture/xcomposite_vaapi.h b/include/capture/xcomposite_vaapi.h index 6cf30c3..bba485b 100644 --- a/include/capture/xcomposite_vaapi.h +++ b/include/capture/xcomposite_vaapi.h @@ -2,12 +2,14 @@ #define GSR_CAPTURE_XCOMPOSITE_VAAPI_H #include "capture.h" +#include "../egl.h" #include "../vec2.h" #include typedef struct _XDisplay Display; typedef struct { + gsr_egl *egl; Window window; bool follow_focused; /* If this is set then |window| is ignored */ vec2i region_size; /* This is currently only used with |follow_focused| */ -- cgit v1.2.3