[Bug 789384] glimagesink windows on wayland are created with a fixed window size of 320x240

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Oct 24 21:52:50 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=789384

--- Comment #3 from memeka <mihailescu2m at gmail.com> ---
I'm not sure what is the intended order of events, but this is what happens in
reality:

* create_subsurfaces is called before window_width and window_height are set
* create_subsurfaces is called before preferred_height and preferred_width are
set from my patch
* window of size 320x240 (defaults) is created
* caps are set, video continues to play in 320x240 window

This is what happens with my patch:

* like above, create_subsurfaces is created with 320x240 default window
* create_subsurfaces sets window_height and window_width to default values
* set_preferred_size is called (from caps?), preferred values are set
* window_height and window_width are checked against preferred vales, then
window is resized

> +  if (window_egl->window.window_height != height || window_egl->window.window_width != width) {
> +    window_resize (window_egl, width, height);
> Is this call really necessary?  This would also prefer the preferred size rather than a possible set_render_rectangle() size which is not correct.

so yes, window_resize is really necessary, or else window is again stuck at
320x240 for all videos.

> -  if (window_egl->window.window_width > 0)
> -    width = window_egl->window.window_width;
> This cannot just be removed as it's also used for the set_render_rectangle() case.

Not sure when set_render_rectangle is or should be called, but like i said,
window_width and window_height are set by create_subsurfaces to the default
values. afterwards, I could detect no resize event, and values remain set the
these defaults.
I could check first if window_width && window_height are > 0, if so set
width/height to these values; if not then check for preferred values to set,
and lastly set default values. Would that be more convenient?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list