Skip to content

Commit

Permalink
ext-image-copy-capture: Check if preferred format changed on every frame
Browse files Browse the repository at this point in the history
  • Loading branch information
any1 committed Nov 9, 2024
1 parent 4b08836 commit a68a532
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ext-image-copy-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ static struct ext_image_copy_capture_session_v1_listener session_listener;
static struct ext_image_copy_capture_frame_v1_listener frame_listener;
static struct ext_image_copy_capture_cursor_session_v1_listener cursor_listener;

static bool config_buffers(struct ext_image_copy_capture* self);

static void clear_constraints(struct ext_image_copy_capture* self)
{
if (!self->have_constraints)
Expand Down Expand Up @@ -177,6 +179,11 @@ static void ext_image_copy_capture_schedule_capture(struct ext_image_copy_captur
{
assert(!self->frame);

/* This is done to check if pixel format ratings have changed since
* last time.
*/
config_buffers(self);

self->buffer = wv_buffer_pool_acquire(self->pool);
self->buffer->domain = self->cursor ? WV_BUFFER_DOMAIN_CURSOR :
WV_BUFFER_DOMAIN_OUTPUT;
Expand Down

0 comments on commit a68a532

Please sign in to comment.