diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-06-21 23:01:00 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-06-21 23:01:00 +0200 |
commit | 46da55b1eafef7495204a6733193057853d6575a (patch) | |
tree | 18eb699e521da4265f97e527cb1d3eecbb35c9a8 /include | |
parent | fab9fc9993af7220a6941e975f82cbfbfd109934 (diff) |
fm content: make sure to capture frame on damage and then no damage after fps frame timeout
Diffstat (limited to 'include')
-rw-r--r-- | include/capture/capture.h | 3 | ||||
-rw-r--r-- | include/capture/xcomposite.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/capture/capture.h b/include/capture/capture.h index 8719c40..fbbe767 100644 --- a/include/capture/capture.h +++ b/include/capture/capture.h @@ -21,7 +21,8 @@ struct gsr_capture { /* These methods should not be called manually. Call gsr_capture_* instead */ int (*start)(gsr_capture *cap, AVCodecContext *video_codec_context, AVFrame *frame); void (*tick)(gsr_capture *cap, AVCodecContext *video_codec_context); /* can be NULL */ - bool (*consume_damage)(gsr_capture *cap); /* can be NULL */ + bool (*is_damaged)(gsr_capture *cap); /* can be NULL */ + void (*clear_damage)(gsr_capture *cap); /* can be NULL */ bool (*should_stop)(gsr_capture *cap, bool *err); /* can be NULL */ int (*capture)(gsr_capture *cap, AVFrame *frame); void (*capture_end)(gsr_capture *cap, AVFrame *frame); /* can be NULL */ diff --git a/include/capture/xcomposite.h b/include/capture/xcomposite.h index 83731fa..27b289a 100644 --- a/include/capture/xcomposite.h +++ b/include/capture/xcomposite.h @@ -50,7 +50,8 @@ void gsr_capture_xcomposite_init(gsr_capture_xcomposite *self, const gsr_capture 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_consume_damage(gsr_capture_xcomposite *self); +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); |