Commit 65657375 authored by Stefan Kost's avatar Stefan Kost
Browse files

ximagesink: refactor _update_geometry()

Refactor like in xvimagesink. Remove the extra parameter and adjust the assert check.
parent c84142d3
...@@ -131,8 +131,7 @@ MotifWmHints, MwmHints; ...@@ -131,8 +131,7 @@ MotifWmHints, MwmHints;
static void gst_ximagesink_reset (GstXImageSink * ximagesink); static void gst_ximagesink_reset (GstXImageSink * ximagesink);
static void gst_ximagesink_ximage_destroy (GstXImageSink * ximagesink, static void gst_ximagesink_ximage_destroy (GstXImageSink * ximagesink,
GstXImageBuffer * ximage); GstXImageBuffer * ximage);
static void gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink, static void gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink);
GstXWindow * xwindow);
static void gst_ximagesink_expose (GstXOverlay * overlay); static void gst_ximagesink_expose (GstXOverlay * overlay);
static GstStaticPadTemplate gst_ximagesink_sink_template_factory = static GstStaticPadTemplate gst_ximagesink_sink_template_factory =
...@@ -918,13 +917,12 @@ gst_ximagesink_xwindow_destroy (GstXImageSink * ximagesink, ...@@ -918,13 +917,12 @@ gst_ximagesink_xwindow_destroy (GstXImageSink * ximagesink,
} }
static void static void
gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink, gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink)
GstXWindow * xwindow)
{ {
XWindowAttributes attr; XWindowAttributes attr;
g_return_if_fail (xwindow != NULL);
g_return_if_fail (GST_IS_XIMAGESINK (ximagesink)); g_return_if_fail (GST_IS_XIMAGESINK (ximagesink));
g_return_if_fail (ximagesink->xwindow != NULL);
/* Update the window geometry */ /* Update the window geometry */
g_mutex_lock (ximagesink->x_lock); g_mutex_lock (ximagesink->x_lock);
...@@ -1071,8 +1069,7 @@ gst_ximagesink_handle_xevents (GstXImageSink * ximagesink) ...@@ -1071,8 +1069,7 @@ gst_ximagesink_handle_xevents (GstXImageSink * ximagesink)
break; break;
case ConfigureNotify: case ConfigureNotify:
g_mutex_unlock (ximagesink->x_lock); g_mutex_unlock (ximagesink->x_lock);
gst_ximagesink_xwindow_update_geometry (ximagesink, gst_ximagesink_xwindow_update_geometry (ximagesink);
ximagesink->xwindow);
g_mutex_lock (ximagesink->x_lock); g_mutex_lock (ximagesink->x_lock);
configured = TRUE; configured = TRUE;
break; break;
...@@ -2056,7 +2053,7 @@ gst_ximagesink_expose (GstXOverlay * overlay) ...@@ -2056,7 +2053,7 @@ gst_ximagesink_expose (GstXOverlay * overlay)
{ {
GstXImageSink *ximagesink = GST_XIMAGESINK (overlay); GstXImageSink *ximagesink = GST_XIMAGESINK (overlay);
gst_ximagesink_xwindow_update_geometry (ximagesink, ximagesink->xwindow); gst_ximagesink_xwindow_update_geometry (ximagesink);
gst_ximagesink_ximage_put (ximagesink, NULL); gst_ximagesink_ximage_put (ximagesink, NULL);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment