From f6f8fdb33c630973cc0cc8c1f4f92efa6e4cb7c8 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 15 Sep 2024 04:22:00 +0200 Subject: Portal: sync capture to frame update --- src/capture/portal.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/capture') diff --git a/src/capture/portal.c b/src/capture/portal.c index f134179..95470c1 100644 --- a/src/capture/portal.c +++ b/src/capture/portal.c @@ -374,6 +374,16 @@ static bool gsr_capture_portal_uses_external_image(gsr_capture *cap) { return true; } +static bool gsr_capture_portal_is_damaged(gsr_capture *cap) { + gsr_capture_portal *self = cap->priv; + return gsr_pipewire_is_damaged(&self->pipewire); +} + +static void gsr_capture_portal_clear_damage(gsr_capture *cap) { + gsr_capture_portal *self = cap->priv; + gsr_pipewire_clear_damage(&self->pipewire); +} + static void gsr_capture_portal_destroy(gsr_capture *cap, AVCodecContext *video_codec_context) { (void)video_codec_context; gsr_capture_portal *cap_portal = cap->priv; @@ -411,6 +421,8 @@ gsr_capture* gsr_capture_portal_create(const gsr_capture_portal_params *params) .capture_end = gsr_capture_portal_capture_end, .get_source_color = gsr_capture_portal_get_source_color, .uses_external_image = gsr_capture_portal_uses_external_image, + .is_damaged = gsr_capture_portal_is_damaged, + .clear_damage = gsr_capture_portal_clear_damage, .destroy = gsr_capture_portal_destroy, .priv = cap_portal }; -- cgit v1.2.3