aboutsummaryrefslogtreecommitdiff
path: root/src/capture/xcomposite.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-06-21 23:01:00 +0200
committerdec05eba <dec05eba@protonmail.com>2024-06-21 23:01:00 +0200
commit46da55b1eafef7495204a6733193057853d6575a (patch)
tree18eb699e521da4265f97e527cb1d3eecbb35c9a8 /src/capture/xcomposite.c
parentfab9fc9993af7220a6941e975f82cbfbfd109934 (diff)
fm content: make sure to capture frame on damage and then no damage after fps frame timeout
Diffstat (limited to 'src/capture/xcomposite.c')
-rw-r--r--src/capture/xcomposite.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/capture/xcomposite.c b/src/capture/xcomposite.c
index c68acaa..3240ed8 100644
--- a/src/capture/xcomposite.c
+++ b/src/capture/xcomposite.c
@@ -285,15 +285,12 @@ void gsr_capture_xcomposite_tick(gsr_capture_xcomposite *self, AVCodecContext *v
}
}
-bool gsr_capture_xcomposite_consume_damage(gsr_capture_xcomposite *self) {
- if(self->damage_event) {
- const bool damaged = self->damaged;
- self->damaged = false;
- //fprintf(stderr, "consume: %s\n", damaged ? "yes" : "no");
- return damaged;
- } else {
- return true;
- }
+bool gsr_capture_xcomposite_is_damaged(gsr_capture_xcomposite *self) {
+ return self->damage_event ? self->damaged : true;
+}
+
+void gsr_capture_xcomposite_clear_damage(gsr_capture_xcomposite *self) {
+ self->damaged = false;
}
bool gsr_capture_xcomposite_should_stop(gsr_capture_xcomposite *self, bool *err) {