mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Add support for software video encoding with '-encoder cpu' option, currently h264 only
This commit is contained in:
@@ -62,9 +62,10 @@ void gsr_capture_destroy(gsr_capture *cap, AVCodecContext *video_codec_context);
|
||||
|
||||
bool gsr_capture_base_setup_vaapi_textures(gsr_capture_base *self, AVFrame *frame, VADisplay va_dpy, VADRMPRIMESurfaceDescriptor *prime, gsr_color_range color_range);
|
||||
bool gsr_capture_base_setup_cuda_textures(gsr_capture_base *self, AVFrame *frame, gsr_cuda_context *cuda_context, gsr_color_range color_range, gsr_source_color source_color, bool hdr);
|
||||
bool gsr_capture_base_setup_textures(gsr_capture_base *self, AVFrame *frame, gsr_color_range color_range, gsr_source_color source_color, bool hdr, bool cursor_texture_is_external);
|
||||
void gsr_capture_base_stop(gsr_capture_base *self);
|
||||
|
||||
bool drm_create_codec_context(const char *card_path, AVCodecContext *video_codec_context, int width, int height, bool hdr, VADisplay *va_dpy);
|
||||
bool vaapi_create_codec_context(const char *card_path, AVCodecContext *video_codec_context, int width, int height, bool hdr, VADisplay *va_dpy);
|
||||
bool cuda_create_codec_context(CUcontext cu_ctx, AVCodecContext *video_codec_context, int width, int height, bool hdr, CUstream *cuda_stream);
|
||||
|
||||
#endif /* GSR_CAPTURE_CAPTURE_H */
|
||||
|
||||
19
include/capture/kms_software.h
Normal file
19
include/capture/kms_software.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef GSR_CAPTURE_KMS_SOFTWARE_H
|
||||
#define GSR_CAPTURE_KMS_SOFTWARE_H
|
||||
|
||||
#include "../vec2.h"
|
||||
#include "../utils.h"
|
||||
#include "../color_conversion.h"
|
||||
#include "capture.h"
|
||||
|
||||
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 */
|
||||
bool hdr;
|
||||
gsr_color_range color_range;
|
||||
bool record_cursor;
|
||||
} gsr_capture_kms_software_params;
|
||||
|
||||
gsr_capture* gsr_capture_kms_software_create(const gsr_capture_kms_software_params *params);
|
||||
|
||||
#endif /* GSR_CAPTURE_KMS_SOFTWARE_H */
|
||||
@@ -15,6 +15,7 @@ typedef struct {
|
||||
bool hdr;
|
||||
gsr_color_range color_range;
|
||||
bool record_cursor;
|
||||
bool use_software_video_encoder;
|
||||
} gsr_capture_nvfbc_params;
|
||||
|
||||
gsr_capture* gsr_capture_nvfbc_create(const gsr_capture_nvfbc_params *params);
|
||||
|
||||
13
include/capture/xcomposite_software.h
Normal file
13
include/capture/xcomposite_software.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef GSR_CAPTURE_XCOMPOSITE_SOFTWARE_H
|
||||
#define GSR_CAPTURE_XCOMPOSITE_SOFTWARE_H
|
||||
|
||||
#include "capture.h"
|
||||
#include "xcomposite.h"
|
||||
|
||||
typedef struct {
|
||||
gsr_capture_xcomposite_params base;
|
||||
} gsr_capture_xcomposite_software_params;
|
||||
|
||||
gsr_capture* gsr_capture_xcomposite_software_create(const gsr_capture_xcomposite_software_params *params);
|
||||
|
||||
#endif /* GSR_CAPTURE_XCOMPOSITE_SOFTWARE_H */
|
||||
Reference in New Issue
Block a user