aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-02-16 14:21:17 +0100
committerdec05eba <dec05eba@protonmail.com>2025-02-16 14:21:17 +0100
commit1b5cde07896518202f491672977beb3172142f12 (patch)
tree41a9fb4646090448e686345221656a7baaee763f /include
parent62bbdd7c30e3638e7ade7828df6ddc4e41fccb9e (diff)
Support taking a screenshot (-o image.jpg/image.png)
Diffstat (limited to 'include')
-rw-r--r--include/capture/nvfbc.h1
-rw-r--r--include/color_conversion.h3
-rw-r--r--include/egl.h2
-rw-r--r--include/encoder/video/image.h15
4 files changed, 19 insertions, 2 deletions
diff --git a/include/capture/nvfbc.h b/include/capture/nvfbc.h
index f291f33..90da7fa 100644
--- a/include/capture/nvfbc.h
+++ b/include/capture/nvfbc.h
@@ -14,7 +14,6 @@ typedef struct {
gsr_color_depth color_depth;
gsr_color_range color_range;
bool record_cursor;
- bool use_software_video_encoder;
vec2i output_resolution;
} gsr_capture_nvfbc_params;
diff --git a/include/color_conversion.h b/include/color_conversion.h
index c079edd..b80be21 100644
--- a/include/color_conversion.h
+++ b/include/color_conversion.h
@@ -22,7 +22,8 @@ typedef enum {
typedef enum {
GSR_DESTINATION_COLOR_NV12, /* YUV420, BT709, 8-bit */
- GSR_DESTINATION_COLOR_P010 /* YUV420, BT2020, 10-bit */
+ GSR_DESTINATION_COLOR_P010, /* YUV420, BT2020, 10-bit */
+ GSR_DESTINATION_COLOR_RGB8
} gsr_destination_color;
typedef struct {
diff --git a/include/egl.h b/include/egl.h
index 78c6836..8a2b6c2 100644
--- a/include/egl.h
+++ b/include/egl.h
@@ -104,11 +104,13 @@ typedef void(*__GLXextFuncPtr)(void);
#define GL_RG 0x8227
#define GL_RGB 0x1907
#define GL_RGBA 0x1908
+#define GL_RGB8 0x8051
#define GL_RGBA8 0x8058
#define GL_R8 0x8229
#define GL_RG8 0x822B
#define GL_R16 0x822A
#define GL_RG16 0x822C
+#define GL_RGB16 0x8054
#define GL_UNSIGNED_BYTE 0x1401
#define GL_COLOR_BUFFER_BIT 0x00004000
#define GL_TEXTURE_WRAP_S 0x2802
diff --git a/include/encoder/video/image.h b/include/encoder/video/image.h
new file mode 100644
index 0000000..76c7bd4
--- /dev/null
+++ b/include/encoder/video/image.h
@@ -0,0 +1,15 @@
+#ifndef GSR_ENCODER_VIDEO_IMAGE_H
+#define GSR_ENCODER_VIDEO_IMAGE_H
+
+#include "video.h"
+
+typedef struct gsr_egl gsr_egl;
+
+typedef struct {
+ gsr_egl *egl;
+ gsr_color_depth color_depth;
+} gsr_video_encoder_image_params;
+
+gsr_video_encoder* gsr_video_encoder_image_create(const gsr_video_encoder_image_params *params);
+
+#endif /* GSR_ENCODER_VIDEO_IMAGE_H */