mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
eglglessink: WIP: Reorder locking
This commit is contained in:
parent
289f388085
commit
40d6cc2099
1 changed files with 6 additions and 6 deletions
|
@ -778,6 +778,8 @@ gst_eglglessink_fill_supported_fbuffer_configs (GstEglGlesSink * eglglessink)
|
||||||
GstEglGlesImageFmt *format;
|
GstEglGlesImageFmt *format;
|
||||||
|
|
||||||
/* Init supported format/caps list */
|
/* Init supported format/caps list */
|
||||||
|
g_mutex_lock (eglglessink->flow_lock);
|
||||||
|
|
||||||
if (eglChooseConfig (eglglessink->display, eglglessink_RGB888_config,
|
if (eglChooseConfig (eglglessink->display, eglglessink_RGB888_config,
|
||||||
NULL, 1, &cfg_number) != EGL_FALSE) {
|
NULL, 1, &cfg_number) != EGL_FALSE) {
|
||||||
format = g_new0 (GstEglGlesImageFmt, 1);
|
format = g_new0 (GstEglGlesImageFmt, 1);
|
||||||
|
@ -817,6 +819,8 @@ gst_eglglessink_fill_supported_fbuffer_configs (GstEglGlesSink * eglglessink)
|
||||||
GST_INFO_OBJECT (eglglessink,
|
GST_INFO_OBJECT (eglglessink,
|
||||||
"EGL display doesn't support RGBA8888 config");
|
"EGL display doesn't support RGBA8888 config");
|
||||||
|
|
||||||
|
g_mutex_unlock (eglglessink->flow_lock);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -826,9 +830,6 @@ gst_eglglessink_start (GstBaseSink * sink)
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
GstEglGlesSink *eglglessink = GST_EGLGLESSINK (sink);
|
GstEglGlesSink *eglglessink = GST_EGLGLESSINK (sink);
|
||||||
|
|
||||||
eglglessink->flow_lock = g_mutex_new ();
|
|
||||||
g_mutex_lock (eglglessink->flow_lock);
|
|
||||||
|
|
||||||
ret = platform_wrapper_init ();
|
ret = platform_wrapper_init ();
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
|
@ -849,12 +850,10 @@ gst_eglglessink_start (GstBaseSink * sink)
|
||||||
/* Ask for a window to render to */
|
/* Ask for a window to render to */
|
||||||
gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (eglglessink));
|
gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (eglglessink));
|
||||||
|
|
||||||
g_mutex_unlock (eglglessink->flow_lock);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
HANDLE_ERROR:
|
HANDLE_ERROR:
|
||||||
g_mutex_unlock (eglglessink->flow_lock);
|
GST_ERROR_OBJECT (eglglessink, "Couldn't start");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1723,6 +1722,7 @@ gst_eglglessink_init (GstEglGlesSink * eglglessink,
|
||||||
eglglessink->running = FALSE; /* XXX: unused */
|
eglglessink->running = FALSE; /* XXX: unused */
|
||||||
eglglessink->can_create_window = TRUE;
|
eglglessink->can_create_window = TRUE;
|
||||||
eglglessink->force_rendering_slow = FALSE;
|
eglglessink->force_rendering_slow = FALSE;
|
||||||
|
eglglessink->flow_lock = g_mutex_new ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Interface initializations. Used here for initializing the XOverlay
|
/* Interface initializations. Used here for initializing the XOverlay
|
||||||
|
|
Loading…
Reference in a new issue