mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
waylandsink: drop width/height arguments from gst_wl_window_new_from_surface()
This commit is contained in:
parent
0187be8e0c
commit
bd5ad17e58
3 changed files with 9 additions and 6 deletions
|
@ -681,7 +681,8 @@ gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle)
|
||||||
wl_proxy_set_queue ((struct wl_proxy *) whandle->surface,
|
wl_proxy_set_queue ((struct wl_proxy *) whandle->surface,
|
||||||
sink->display->queue);
|
sink->display->queue);
|
||||||
sink->window = gst_wl_window_new_from_surface (sink->display,
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,9 +95,11 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, gint width, gint height)
|
||||||
GstWlWindow *window;
|
GstWlWindow *window;
|
||||||
|
|
||||||
window = gst_wl_window_new_from_surface (display,
|
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;
|
window->own_surface = TRUE;
|
||||||
|
|
||||||
|
gst_wl_window_set_size (window, width, height);
|
||||||
|
|
||||||
window->shell_surface = wl_shell_get_shell_surface (display->shell,
|
window->shell_surface = wl_shell_get_shell_surface (display->shell,
|
||||||
window->surface);
|
window->surface);
|
||||||
|
|
||||||
|
@ -117,7 +119,7 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, gint width, gint height)
|
||||||
|
|
||||||
GstWlWindow *
|
GstWlWindow *
|
||||||
gst_wl_window_new_from_surface (GstWlDisplay * display,
|
gst_wl_window_new_from_surface (GstWlDisplay * display,
|
||||||
struct wl_surface * surface, gint width, gint height)
|
struct wl_surface * surface)
|
||||||
{
|
{
|
||||||
GstWlWindow *window;
|
GstWlWindow *window;
|
||||||
struct wl_region *region;
|
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 = g_object_new (GST_TYPE_WL_WINDOW, NULL);
|
||||||
window->display = g_object_ref (display);
|
window->display = g_object_ref (display);
|
||||||
window->width = width;
|
window->width = 0;
|
||||||
window->height = height;
|
window->height = 0;
|
||||||
|
|
||||||
window->surface = surface;
|
window->surface = surface;
|
||||||
window->own_surface = FALSE;
|
window->own_surface = FALSE;
|
||||||
|
|
|
@ -57,7 +57,7 @@ GType gst_wl_window_get_type (void);
|
||||||
GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display,
|
GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display,
|
||||||
gint width, gint height);
|
gint width, gint height);
|
||||||
GstWlWindow *gst_wl_window_new_from_surface (GstWlDisplay * display,
|
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);
|
GstWlDisplay *gst_wl_window_get_display (GstWlWindow * window);
|
||||||
struct wl_surface *gst_wl_window_get_wl_surface (GstWlWindow * window);
|
struct wl_surface *gst_wl_window_get_wl_surface (GstWlWindow * window);
|
||||||
|
|
Loading…
Reference in a new issue