mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
sys/: I prefer locking the mutex in the function directly. We might want to call it from somewhere else one day.
Original commit message from CVS: 2004-06-27 Julien Moutte <julien@moutte.net> * sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_decorate), (gst_ximagesink_xwindow_new): * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xwindow_decorate), (gst_xvimagesink_xwindow_new): I prefer locking the mutex in the function directly. We might want to call it from somewhere else one day.
This commit is contained in:
parent
fa3c245918
commit
2624d3ea37
3 changed files with 20 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
|||
2004-06-27 Julien Moutte <julien@moutte.net>
|
||||
|
||||
* sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_decorate),
|
||||
(gst_ximagesink_xwindow_new):
|
||||
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xwindow_decorate),
|
||||
(gst_xvimagesink_xwindow_new): I prefer locking the mutex in the
|
||||
function directly. We might want to call it from somewhere else one day.
|
||||
|
||||
2004-06-27 Julien Moutte <julien@moutte.net>
|
||||
|
||||
* sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_decorate),
|
||||
|
|
|
@ -309,6 +309,8 @@ gst_ximagesink_xwindow_decorate (GstXImageSink * ximagesink,
|
|||
g_return_val_if_fail (GST_IS_XIMAGESINK (ximagesink), FALSE);
|
||||
g_return_val_if_fail (window != NULL, FALSE);
|
||||
|
||||
g_mutex_lock (ximagesink->x_lock);
|
||||
|
||||
hints_atom = XInternAtom (ximagesink->xcontext->disp, "_MOTIF_WM_HINTS", 1);
|
||||
|
||||
hints = g_malloc0 (sizeof (MotifWmHints));
|
||||
|
@ -326,6 +328,8 @@ gst_ximagesink_xwindow_decorate (GstXImageSink * ximagesink,
|
|||
|
||||
XSync (ximagesink->xcontext->disp, FALSE);
|
||||
|
||||
g_mutex_unlock (ximagesink->x_lock);
|
||||
|
||||
g_free (hints);
|
||||
|
||||
return TRUE;
|
||||
|
@ -359,12 +363,12 @@ gst_ximagesink_xwindow_new (GstXImageSink * ximagesink, gint width, gint height)
|
|||
|
||||
XMapRaised (ximagesink->xcontext->disp, xwindow->win);
|
||||
|
||||
gst_ximagesink_xwindow_decorate (ximagesink, xwindow);
|
||||
|
||||
XSync (ximagesink->xcontext->disp, FALSE);
|
||||
|
||||
g_mutex_unlock (ximagesink->x_lock);
|
||||
|
||||
gst_ximagesink_xwindow_decorate (ximagesink, xwindow);
|
||||
|
||||
gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (ximagesink), xwindow->win);
|
||||
|
||||
return xwindow;
|
||||
|
|
|
@ -320,6 +320,8 @@ gst_xvimagesink_xwindow_decorate (GstXvImageSink * xvimagesink,
|
|||
g_return_val_if_fail (GST_IS_XVIMAGESINK (xvimagesink), FALSE);
|
||||
g_return_val_if_fail (window != NULL, FALSE);
|
||||
|
||||
g_mutex_lock (xvimagesink->x_lock);
|
||||
|
||||
hints_atom = XInternAtom (xvimagesink->xcontext->disp, "_MOTIF_WM_HINTS", 1);
|
||||
|
||||
hints = g_malloc0 (sizeof (MotifWmHints));
|
||||
|
@ -337,6 +339,8 @@ gst_xvimagesink_xwindow_decorate (GstXvImageSink * xvimagesink,
|
|||
|
||||
XSync (xvimagesink->xcontext->disp, FALSE);
|
||||
|
||||
g_mutex_unlock (xvimagesink->x_lock);
|
||||
|
||||
g_free (hints);
|
||||
|
||||
return TRUE;
|
||||
|
@ -374,12 +378,12 @@ gst_xvimagesink_xwindow_new (GstXvImageSink * xvimagesink,
|
|||
|
||||
XMapRaised (xvimagesink->xcontext->disp, xwindow->win);
|
||||
|
||||
gst_xvimagesink_xwindow_decorate (xvimagesink, xwindow);
|
||||
|
||||
XSync (xvimagesink->xcontext->disp, FALSE);
|
||||
|
||||
g_mutex_unlock (xvimagesink->x_lock);
|
||||
|
||||
gst_xvimagesink_xwindow_decorate (xvimagesink, xwindow);
|
||||
|
||||
gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (xvimagesink), xwindow->win);
|
||||
|
||||
return xwindow;
|
||||
|
|
Loading…
Reference in a new issue