aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/recorder/capture_setup.h
diff options
context:
space:
mode:
authorMaria Lisina <sekoohaka.sarisan@gmail.com>2026-08-10 10:38:14 +0500
committerMaria Lisina <sekoohaka.sarisan@gmail.com>2026-08-10 10:38:14 +0500
commit6dc1149d078fc3b04a19696bfb7d5d6940372175 (patch)
tree169f7f71e6a292a4ab61a0493000e1add4430f8e /include/recorder/capture_setup.h
parent6836426ae183b9a7d0ec99c1e147e8ad6edabd92 (diff)
parent80517840f4ae64469721598e8373d81f2e4493dd (diff)
Merge tag '6.0.0' of https://repo.dec05eba.com/gpu-screen-recorder into debian
Diffstat (limited to 'include/recorder/capture_setup.h')
-rw-r--r--include/recorder/capture_setup.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/recorder/capture_setup.h b/include/recorder/capture_setup.h
new file mode 100644
index 0000000..fd4b7e7
--- /dev/null
+++ b/include/recorder/capture_setup.h
@@ -0,0 +1,49 @@
+#ifndef GSR_RECORDER_CAPTURE_SETUP_H
+#define GSR_RECORDER_CAPTURE_SETUP_H
+
+#include <stdbool.h>
+#include <stddef.h>
+#include "../egl.h"
+#include "../cursor.h"
+#include "../kde_night_light.h"
+#include "../capture/capture.h"
+#include "../../kms/client/kms_client.h"
+#include "capture_source.h"
+#include "settings.h"
+
+#include <X11/Xlib.h>
+
+typedef struct {
+ gsr_kms_client kms_client;
+ bool kms_client_initialized;
+ gsr_kms_response kms_response;
+ gsr_kde_night_light *kde_night_light;
+ bool kde_night_light_initialized;
+ gsr_cursor x11_cursor;
+ Display *x11_cursor_display;
+} gsr_capture_deps;
+
+typedef struct {
+ gsr_capture *capture;
+ gsr_capture_metadata metadata;
+ gsr_capture_source *capture_source;
+} gsr_video_source;
+
+typedef struct {
+ gsr_video_source *items;
+ size_t num_items;
+} gsr_video_sources;
+
+void gsr_capture_deps_init(gsr_capture_deps *self);
+void gsr_capture_deps_init_cursor(gsr_capture_deps *self, gsr_egl *egl, bool record_cursor);
+void gsr_capture_deps_deinit(gsr_capture_deps *self);
+void gsr_capture_deps_cleanup_kms_fds(gsr_capture_deps *self);
+void gsr_capture_deps_update_kms(gsr_capture_deps *self);
+
+/* Returns a |gsr_error| value, or the error returned by gsr_capture_start. |video_size| is set to the size of all capture sources combined */
+int gsr_video_sources_create(gsr_video_sources *self, const gsr_recorder_settings *settings, gsr_egl *egl, gsr_capture_deps *deps, bool prefer_ximage, gsr_capture_sources *capture_sources, vec2i *video_size);
+void gsr_video_sources_update_with_real_video_size(gsr_video_sources *self, vec2i video_size);
+bool gsr_video_sources_uses_external_image(const gsr_video_sources *self);
+void gsr_video_sources_deinit(gsr_video_sources *self);
+
+#endif /* GSR_RECORDER_CAPTURE_SETUP_H */