mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 17:17:16 +09:00
Move card path to egl struct, use egl struct for monitor enumeration
This commit is contained in:
@@ -11,7 +11,6 @@ typedef struct {
|
||||
gsr_egl *egl;
|
||||
const char *display_to_capture; /* if this is "screen", then the first monitor is captured. A copy is made of this */
|
||||
gsr_gpu_info gpu_inf;
|
||||
const char *card_path; /* reference */
|
||||
} gsr_capture_kms_cuda_params;
|
||||
|
||||
gsr_capture* gsr_capture_kms_cuda_create(const gsr_capture_kms_cuda_params *params);
|
||||
|
||||
@@ -12,7 +12,6 @@ typedef struct {
|
||||
gsr_egl *egl;
|
||||
const char *display_to_capture; /* if this is "screen", then the first monitor is captured. A copy is made of this */
|
||||
gsr_gpu_info gpu_inf;
|
||||
const char *card_path; /* reference */
|
||||
bool wayland;
|
||||
bool hdr;
|
||||
gsr_color_range color_range;
|
||||
|
||||
@@ -4,13 +4,9 @@
|
||||
#include "capture.h"
|
||||
#include "../egl.h"
|
||||
#include "../vec2.h"
|
||||
#include <X11/X.h>
|
||||
|
||||
typedef struct _XDisplay Display;
|
||||
|
||||
typedef struct {
|
||||
gsr_egl *egl;
|
||||
Display *dpy;
|
||||
Window window;
|
||||
bool follow_focused; /* If this is set then |window| is ignored */
|
||||
vec2i region_size; /* This is currently only used with |follow_focused| */
|
||||
|
||||
@@ -5,17 +5,12 @@
|
||||
#include "../egl.h"
|
||||
#include "../vec2.h"
|
||||
#include "../color_conversion.h"
|
||||
#include <X11/X.h>
|
||||
|
||||
typedef struct _XDisplay Display;
|
||||
|
||||
typedef struct {
|
||||
gsr_egl *egl;
|
||||
Display *dpy;
|
||||
Window window;
|
||||
bool follow_focused; /* If this is set then |window| is ignored */
|
||||
vec2i region_size; /* This is currently only used with |follow_focused| */
|
||||
const char *card_path; /* reference */
|
||||
gsr_color_range color_range;
|
||||
} gsr_capture_xcomposite_vaapi_params;
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ typedef struct {
|
||||
|
||||
gsr_x11 x11;
|
||||
gsr_wayland wayland;
|
||||
char card_path[128];
|
||||
|
||||
int fd;
|
||||
uint32_t x;
|
||||
@@ -234,7 +235,7 @@ bool gsr_egl_load(gsr_egl *self, Display *dpy, bool wayland);
|
||||
void gsr_egl_unload(gsr_egl *self);
|
||||
|
||||
/* wayland protocol capture, does not include kms capture */
|
||||
bool gsr_egl_supports_wayland_capture(gsr_egl *self);
|
||||
bool gsr_egl_supports_wayland_capture(const gsr_egl *self);
|
||||
bool gsr_egl_start_capture(gsr_egl *self, const char *monitor_to_capture);
|
||||
void gsr_egl_update(gsr_egl *self);
|
||||
void gsr_egl_cleanup_frame(gsr_egl *self);
|
||||
|
||||
@@ -43,8 +43,9 @@ typedef struct {
|
||||
double clock_get_monotonic_seconds(void);
|
||||
|
||||
typedef void (*active_monitor_callback)(const gsr_monitor *monitor, void *userdata);
|
||||
void for_each_active_monitor_output(void *connection, gsr_connection_type connection_type, active_monitor_callback callback, void *userdata);
|
||||
bool get_monitor_by_name(void *connection, gsr_connection_type connection_type, const char *name, gsr_monitor *monitor);
|
||||
void for_each_active_monitor_output_x11(Display *display, active_monitor_callback callback, void *userdata);
|
||||
void for_each_active_monitor_output(const gsr_egl *egl, gsr_connection_type connection_type, active_monitor_callback callback, void *userdata);
|
||||
bool get_monitor_by_name(const gsr_egl *egl, gsr_connection_type connection_type, const char *name, gsr_monitor *monitor);
|
||||
|
||||
bool gl_get_gpu_info(gsr_egl *egl, gsr_gpu_info *info);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user