guint fullscreen_on_show:1;
guint sync_failed:1;
volatile guint num_frames_pending;
+ gint configure_pending;
gboolean need_vpp;
};
handle_xdg_toplevel_close,
};
+static gboolean gst_vaapi_window_wayland_sync (GstVaapiWindow * window);
+
static gboolean
gst_vaapi_window_wayland_show (GstVaapiWindow * window)
{
return TRUE;
}
+ g_atomic_int_set (&priv->configure_pending, 1);
+ g_atomic_int_inc (&priv->num_frames_pending);
/* Create a toplevel window out of it */
priv->xdg_toplevel = xdg_surface_get_toplevel (priv->xdg_surface);
g_return_val_if_fail (priv->xdg_toplevel, FALSE);
/* Commit the xdg_surface state as top-level window */
wl_surface_commit (priv->surface);
- return TRUE;
+ return gst_vaapi_window_wayland_sync (window);
}
static gboolean
handle_xdg_surface_configure (void *data, struct xdg_surface *xdg_surface,
uint32_t serial)
{
+ GstVaapiWindow *window = GST_VAAPI_WINDOW (data);
+ GstVaapiWindowWaylandPrivate *priv =
+ GST_VAAPI_WINDOW_WAYLAND_GET_PRIVATE (window);
+
xdg_surface_ack_configure (xdg_surface, serial);
+ if (g_atomic_int_compare_and_exchange (&priv->configure_pending, 1, 0))
+ g_atomic_int_dec_and_test (&priv->num_frames_pending);
}
static const struct xdg_surface_listener xdg_surface_listener = {