From: Sebastian Dröge Date: Tue, 3 May 2011 10:57:28 +0000 (+0200) Subject: ximagesink: Send reconfigure event upstream if the window geometry changes X-Git-Tag: 1.19.3~511^2~7709 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=061c4eb9e3e14207a70c0b480b7c7deac9ec9700;p=platform%2Fupstream%2Fgstreamer.git ximagesink: Send reconfigure event upstream if the window geometry changes --- diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 80fff86..4f4ff1d 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -475,6 +475,7 @@ static void gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink) { XWindowAttributes attr; + gboolean reconfigure; g_return_if_fail (GST_IS_XIMAGESINK (ximagesink)); @@ -488,10 +489,17 @@ gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink) XGetWindowAttributes (ximagesink->xcontext->disp, ximagesink->xwindow->win, &attr); + /* Check if we would suggest a different width/height now */ + reconfigure = (ximagesink->xwindow->width != attr.width) + || (ximagesink->xwindow->height != attr.height); ximagesink->xwindow->width = attr.width; ximagesink->xwindow->height = attr.height; g_mutex_unlock (ximagesink->x_lock); + + if (reconfigure) + gst_pad_push_event (GST_BASE_SINK (ximagesink)->sinkpad, + gst_event_new_reconfigure ()); } static void