summaryrefslogtreecommitdiff
path: root/ext/gl
diff options
context:
space:
mode:
authorLubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>2015-07-01 14:01:45 +0200
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2015-07-20 14:41:12 -0400
commit2b7542400cce4c8d27d73e3b1fbf3ce694af77b8 (patch)
tree4228526c9ce66697f1ff4cc4630fa422fbed4718 /ext/gl
parent2fb862b34fbe1f7713381144800f863aad1ef16f (diff)
downloadgstreamer-plugins-bad-2b7542400cce4c8d27d73e3b1fbf3ce694af77b8.tar.gz
glimagesink: Send reconfigure event when window size changes
https://bugzilla.gnome.org/show_bug.cgi?id=745107
Diffstat (limited to 'ext/gl')
-rw-r--r--ext/gl/gstglimagesink.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c
index bb1ee18bc..ed7ea7f0c 100644
--- a/ext/gl/gstglimagesink.c
+++ b/ext/gl/gstglimagesink.c
@@ -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;