mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
glimagesink: Send reconfigure event when window size changes
https://bugzilla.gnome.org/show_bug.cgi?id=745107
This commit is contained in:
parent
2fb862b34f
commit
2b7542400c
1 changed files with 13 additions and 0 deletions
|
@ -1721,6 +1721,7 @@ gst_glimage_sink_do_resize (GstGLImageSink * gl_sink, gint width, gint height)
|
|||
* It means that they cannot change between two set_caps
|
||||
*/
|
||||
gboolean do_reshape;
|
||||
gboolean reconfigure;
|
||||
|
||||
GST_GLIMAGE_SINK_UNLOCK (gl_sink);
|
||||
/* check if a client reshape callback is registered */
|
||||
|
@ -1731,6 +1732,18 @@ gst_glimage_sink_do_resize (GstGLImageSink * gl_sink, gint width, gint height)
|
|||
width = MAX (1, width);
|
||||
height = MAX (1, height);
|
||||
|
||||
/* Check if we would suggest a different width/height now */
|
||||
reconfigure = ((gl_sink->window_width != width)
|
||||
|| (gl_sink->window_height != height))
|
||||
&& (gl_sink->window_width != 0)
|
||||
&& (gl_sink->window_height != 0);
|
||||
|
||||
if (reconfigure) {
|
||||
GST_DEBUG ("Sending reconfigure event on sinkpad.");
|
||||
gst_pad_push_event (GST_BASE_SINK (gl_sink)->sinkpad,
|
||||
gst_event_new_reconfigure ());
|
||||
}
|
||||
|
||||
gl_sink->window_width = width;
|
||||
gl_sink->window_height = height;
|
||||
|
||||
|
|
Loading…
Reference in a new issue