aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/recorder/screenshot.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/screenshot.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/screenshot.h')
-rw-r--r--include/recorder/screenshot.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/recorder/screenshot.h b/include/recorder/screenshot.h
new file mode 100644
index 0000000..00a7889
--- /dev/null
+++ b/include/recorder/screenshot.h
@@ -0,0 +1,36 @@
+#ifndef GSR_RECORDER_SCREENSHOT_H
+#define GSR_RECORDER_SCREENSHOT_H
+
+#include <stdbool.h>
+#include <stdatomic.h>
+#include "../egl.h"
+#include "../image_writer.h"
+#include "../plugins.h"
+#include "capture_source.h"
+#include "capture_setup.h"
+#include "settings.h"
+
+typedef struct {
+ const gsr_recorder_settings *settings;
+ gsr_egl *egl;
+ gsr_window *window;
+ gsr_capture_deps *capture_deps;
+ gsr_capture_sources *capture_sources;
+ gsr_image_format image_format;
+ const char **plugin_filepaths;
+ int num_plugin_filepaths;
+ const atomic_int *running;
+ void (*screenshot_saved)(const char *filepath, void *userdata);
+ void *userdata;
+} gsr_screenshot_params;
+
+bool get_image_format_from_filename(const char *filename, gsr_image_format *image_format);
+gsr_color_range image_format_to_color_range(gsr_image_format image_format, int image_quality);
+int video_quality_to_image_quality_value(gsr_video_quality video_quality);
+
+/* Returns a |gsr_error| value. Captures one frame and writes it to |settings->filename| */
+int gsr_screenshot_take(const gsr_screenshot_params *params);
+
+int gsr_load_plugins(gsr_plugins *plugins, const char **plugin_filepaths, int num_plugin_filepaths, const gsr_recorder_settings *settings, gsr_egl *egl, vec2i video_size);
+
+#endif /* GSR_RECORDER_SCREENSHOT_H */