diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-07-05 01:59:04 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-07-05 10:33:47 +0200 |
commit | b9fa7f2fa25ee37c87077bce468c95e48fce5c18 (patch) | |
tree | 3aff293110d8405e8057edb9c757f6e630c22de2 /include/capture/xcomposite.h | |
parent | 62d61fda12e3774fee6b671e44fb89bd2ef8da8c (diff) |
Separate video encoding method from capture method
With this instead of kms_cuda/kms_vaapi/kms_software and
xcomposite_cuda/xcomposite_vaapi/xcomposite_software there
is now only kms and xcomposite.
Diffstat (limited to 'include/capture/xcomposite.h')
-rw-r--r-- | include/capture/xcomposite.h | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/include/capture/xcomposite.h b/include/capture/xcomposite.h index 27b289a..707421f 100644 --- a/include/capture/xcomposite.h +++ b/include/capture/xcomposite.h @@ -2,15 +2,11 @@ #define GSR_CAPTURE_XCOMPOSITE_H #include "capture.h" -#include "../egl.h" #include "../vec2.h" -#include "../color_conversion.h" -#include "../window_texture.h" -#include "../cursor.h" typedef struct { gsr_egl *egl; - Window window; + unsigned long window; bool follow_focused; /* If this is set then |window| is ignored */ vec2i region_size; /* This is currently only used with |follow_focused| */ gsr_color_range color_range; @@ -18,41 +14,6 @@ typedef struct { bool track_damage; } gsr_capture_xcomposite_params; -typedef struct { - gsr_capture_base base; - gsr_capture_xcomposite_params params; - XEvent xev; - - bool should_stop; - bool stop_is_error; - bool window_resized; - bool follow_focused_initialized; - - Window window; - vec2i window_size; - vec2i texture_size; - double window_resize_timer; - - WindowTexture window_texture; - - Atom net_active_window_atom; - - gsr_cursor cursor; - - int damage_event; - int damage_error; - XID damage; - bool damaged; -} gsr_capture_xcomposite; - -void gsr_capture_xcomposite_init(gsr_capture_xcomposite *self, const gsr_capture_xcomposite_params *params); - -int gsr_capture_xcomposite_start(gsr_capture_xcomposite *self, AVCodecContext *video_codec_context, AVFrame *frame); -void gsr_capture_xcomposite_stop(gsr_capture_xcomposite *self); -void gsr_capture_xcomposite_tick(gsr_capture_xcomposite *self, AVCodecContext *video_codec_context); -bool gsr_capture_xcomposite_is_damaged(gsr_capture_xcomposite *self); -void gsr_capture_xcomposite_clear_damage(gsr_capture_xcomposite *self); -bool gsr_capture_xcomposite_should_stop(gsr_capture_xcomposite *self, bool *err); -int gsr_capture_xcomposite_capture(gsr_capture_xcomposite *self, AVFrame *frame); +gsr_capture* gsr_capture_xcomposite_create(const gsr_capture_xcomposite_params *params); #endif /* GSR_CAPTURE_XCOMPOSITE_H */ |