Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ foreach dep: wayland['deps']
endif
endforeach
features += {'wayland': wayland_deps and wayland['header'] and wayland['scanner'].found()}
features += {'wl_display_create_queue_with_name': wayland['deps'][0].version().version_compare('>=1.23.0')}

if features['wayland']
subdir(join_paths('video', 'out'))
Expand Down
16 changes: 16 additions & 0 deletions video/out/wayland_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ struct vo_wayland_text_input {
struct vo_wayland_preferred_description_info {
struct vo_wayland_state *wl;
bool is_parametric;
bool info_done;
struct pl_color_space csp;
float min_luma;
float max_luma;
Expand Down Expand Up @@ -346,6 +347,14 @@ static void update_output_geometry(struct vo_wayland_state *wl, struct mp_rect o
struct mp_rect old_output_geometry);
static void destroy_offer(struct vo_wayland_data_offer *o);

#ifndef HAVE_WL_DISPLAY_CREATE_QUEUE_WITH_NAME
struct wl_event_queue *
wl_display_create_queue_with_name(struct wl_display *display, const char *name)
{
return wl_display_create_queue(display);
}
#endif

/* Wayland listener boilerplate */
static void pointer_handle_enter(void *data, struct wl_pointer *pointer,
uint32_t serial, struct wl_surface *surface,
Expand Down Expand Up @@ -2152,6 +2161,7 @@ static void info_done(void *data, struct wp_image_description_info_v1 *image_des
{
struct vo_wayland_preferred_description_info *wd = data;
struct vo_wayland_state *wl = wd->wl;
wd->info_done = true;
wp_image_description_info_v1_destroy(image_description_info);
if (wd->is_parametric) {
wl->preferred_csp = wd->csp;
Expand Down Expand Up @@ -3116,8 +3126,14 @@ static void get_compositor_preferred_description(struct vo_wayland_state *wl, bo
}
struct wp_image_description_info_v1 *description_info =
wp_image_description_v1_get_information(image_description);
struct wl_event_queue *image_description_info_queue = wl_display_create_queue_with_name(wl->display, "image description info queue");
wl_proxy_set_queue((struct wl_proxy *)description_info, image_description_info_queue);
wp_image_description_info_v1_add_listener(description_info, &image_description_info_listener, wd);
while (wl_display_dispatch_queue(wl->display, image_description_info_queue) > 0)
if (wd->info_done)
break;
wp_image_description_v1_destroy(image_description);
wl_event_queue_destroy(image_description_info_queue);
#endif
}

Expand Down
Loading