static guintptr gst_gl_window_wayland_egl_get_display (GstGLWindow * window);
static gboolean gst_gl_window_wayland_egl_set_render_rectangle (GstGLWindow *
window, gint x, gint y, gint width, gint height);
+static void gst_gl_window_wayland_egl_set_preferred_size (GstGLWindow * window,
+ gint width, gint height);
#if 0
static void
if (window_egl->window.window_width > 0)
width = window_egl->window.window_width;
+ else if (window_egl->window.preferred_width > 0)
+ width = window_egl->window.preferred_width;
else
width = 320;
window_egl->window.window_width = width;
if (window_egl->window.window_height > 0)
height = window_egl->window.window_height;
+ else if (window_egl->window.preferred_height > 0)
+ height = window_egl->window.preferred_height;
else
height = 240;
window_egl->window.window_height = height;
GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_get_display);
window_class->set_render_rectangle =
GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_set_render_rectangle);
+ window_class->set_preferred_size =
+ GST_DEBUG_FUNCPTR (gst_gl_window_wayland_egl_set_preferred_size);
}
static void
return TRUE;
}
+static void
+gst_gl_window_wayland_egl_set_preferred_size (GstGLWindow * window, gint width,
+ gint height)
+{
+ GstGLWindowWaylandEGL *window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
+
+ window_egl->window.preferred_width = width;
+ window_egl->window.preferred_height = height;
+ if (window_egl->window.window_height != height
+ || window_egl->window.window_width != width) {
+ window_resize (window_egl, width, height);
+ }
+}
+
static guintptr
gst_gl_window_wayland_egl_get_display (GstGLWindow * window)
{