diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-09-15 04:22:00 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-09-15 04:22:00 +0200 |
commit | f6f8fdb33c630973cc0cc8c1f4f92efa6e4cb7c8 (patch) | |
tree | fce41200c196e909a648b18a56140ceaf276ac92 /src/capture | |
parent | f53d7b30b1afab466257fee3d3a3823cff3ff2ad (diff) |
Portal: sync capture to frame update
Diffstat (limited to 'src/capture')
-rw-r--r-- | src/capture/portal.c | 12 |
1 files changed, 12 insertions, 0 deletions
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 }; |