summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-07-26 09:27:47 -0400
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-07-26 16:12:56 +0200
commit44d6f7631ba8db5537d3c4d0aecb7b778cd51290 (patch)
tree00ad5471924d98bb3395fb60d39a39a7da09f533 /gst-libs/gst/vaapi
parentaf3b6dc2b86fef102329fcef3bb0db8a51841195 (diff)
wayland: respond to ping/pong protocol so we're not deemed unresponsive.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'gst-libs/gst/vaapi')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_wayland.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c
index 69634146..81e658a9 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c
@@ -68,6 +68,30 @@ gst_vaapi_window_wayland_hide(GstVaapiWindow *window)
return TRUE;
}
+static void
+handle_ping(void *data, struct wl_shell_surface *shell_surface,
+ uint32_t serial)
+{
+ wl_shell_surface_pong(shell_surface, serial);
+}
+
+static void
+handle_configure(void *data, struct wl_shell_surface *shell_surface,
+ uint32_t edges, int32_t width, int32_t height)
+{
+}
+
+static void
+handle_popup_done(void *data, struct wl_shell_surface *shell_surface)
+{
+}
+
+static const struct wl_shell_surface_listener shell_surface_listener = {
+ handle_ping,
+ handle_configure,
+ handle_popup_done
+};
+
static gboolean
gst_vaapi_window_wayland_create(
GstVaapiWindow *window,
@@ -94,6 +118,8 @@ gst_vaapi_window_wayland_create(
if (!priv->shell_surface)
return FALSE;
+ wl_shell_surface_add_listener(priv->shell_surface,
+ &shell_surface_listener, priv);
wl_shell_surface_set_toplevel(priv->shell_surface);
wl_shell_surface_set_fullscreen(
priv->shell_surface,