aboutsummaryrefslogtreecommitdiff
path: root/src/capture/xcomposite_vaapi.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-06-21 22:18:23 +0200
committerdec05eba <dec05eba@protonmail.com>2024-06-21 22:18:23 +0200
commitab78e5687297ff5c27dc8b33e7d9f93a873af34f (patch)
tree7cc47a66a5408d8ccb73430b214c8aa703038ded /src/capture/xcomposite_vaapi.c
parent4bfb095f8d4250e94a64be53858f5d0544944999 (diff)
Add -fm 'content' option to match fps to captured content, only x11 window capture currently supported
Diffstat (limited to 'src/capture/xcomposite_vaapi.c')
-rw-r--r--src/capture/xcomposite_vaapi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/capture/xcomposite_vaapi.c b/src/capture/xcomposite_vaapi.c
index 8c9c56c..b8d4544 100644
--- a/src/capture/xcomposite_vaapi.c
+++ b/src/capture/xcomposite_vaapi.c
@@ -43,6 +43,11 @@ static void gsr_capture_xcomposite_vaapi_tick(gsr_capture *cap, AVCodecContext *
gsr_capture_xcomposite_tick(&cap_xcomp->xcomposite, video_codec_context);
}
+static bool gsr_capture_xcomposite_vaapi_consume_damage(gsr_capture *cap) {
+ gsr_capture_xcomposite_vaapi *cap_xcomp = cap->priv;
+ return gsr_capture_xcomposite_consume_damage(&cap_xcomp->xcomposite);
+}
+
static bool gsr_capture_xcomposite_vaapi_should_stop(gsr_capture *cap, bool *err) {
gsr_capture_xcomposite_vaapi *cap_xcomp = cap->priv;
return gsr_capture_xcomposite_should_stop(&cap_xcomp->xcomposite, err);
@@ -98,6 +103,7 @@ gsr_capture* gsr_capture_xcomposite_vaapi_create(const gsr_capture_xcomposite_va
*cap = (gsr_capture) {
.start = gsr_capture_xcomposite_vaapi_start,
.tick = gsr_capture_xcomposite_vaapi_tick,
+ .consume_damage = gsr_capture_xcomposite_vaapi_consume_damage,
.should_stop = gsr_capture_xcomposite_vaapi_should_stop,
.capture = gsr_capture_xcomposite_vaapi_capture,
.capture_end = NULL,