waylandsink: drop width/height arguments from gst_wl_window_new_from_surface()

This commit is contained in:
George Kiagiadakis 2014-05-21 13:14:15 +03:00
parent 0187be8e0c
commit bd5ad17e58
3 changed files with 9 additions and 6 deletions

View file

@ -681,7 +681,8 @@ gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle)
wl_proxy_set_queue ((struct wl_proxy *) whandle->surface,
sink->display->queue);
sink->window = gst_wl_window_new_from_surface (sink->display,
whandle->surface, whandle->width, whandle->height);
whandle->surface);
gst_wl_window_set_size (sink->window, whandle->width, whandle->height);
}
}

View file

@ -95,9 +95,11 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, gint width, gint height)
GstWlWindow *window;
window = gst_wl_window_new_from_surface (display,
wl_compositor_create_surface (display->compositor), width, height);
wl_compositor_create_surface (display->compositor));
window->own_surface = TRUE;
gst_wl_window_set_size (window, width, height);
window->shell_surface = wl_shell_get_shell_surface (display->shell,
window->surface);
@ -117,7 +119,7 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, gint width, gint height)
GstWlWindow *
gst_wl_window_new_from_surface (GstWlDisplay * display,
struct wl_surface * surface, gint width, gint height)
struct wl_surface * surface)
{
GstWlWindow *window;
struct wl_region *region;
@ -126,8 +128,8 @@ gst_wl_window_new_from_surface (GstWlDisplay * display,
window = g_object_new (GST_TYPE_WL_WINDOW, NULL);
window->display = g_object_ref (display);
window->width = width;
window->height = height;
window->width = 0;
window->height = 0;
window->surface = surface;
window->own_surface = FALSE;

View file

@ -57,7 +57,7 @@ GType gst_wl_window_get_type (void);
GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display,
gint width, gint height);
GstWlWindow *gst_wl_window_new_from_surface (GstWlDisplay * display,
struct wl_surface * surface, gint width, gint height);
struct wl_surface * surface);
GstWlDisplay *gst_wl_window_get_display (GstWlWindow * window);
struct wl_surface *gst_wl_window_get_wl_surface (GstWlWindow * window);