mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-05 15:08:48 +00:00
glbasemixer: use gst_display_ensure_context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3843>
This commit is contained in:
parent
7bee4619dd
commit
ecd9a4e37c
1 changed files with 3 additions and 19 deletions
|
@ -186,26 +186,10 @@ _get_gl_context_unlocked (GstGLBaseMixer * mix)
|
||||||
|
|
||||||
_find_local_gl_context_unlocked (mix);
|
_find_local_gl_context_unlocked (mix);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (mix->display);
|
if (!gst_gl_display_ensure_context (mix->display, mix->priv->other_context,
|
||||||
if (!mix->context) {
|
&mix->context, &error)) {
|
||||||
do {
|
goto context_error;
|
||||||
if (mix->context) {
|
|
||||||
gst_object_unref (mix->context);
|
|
||||||
mix->context = NULL;
|
|
||||||
}
|
|
||||||
/* just get a GL context. we don't care */
|
|
||||||
mix->context =
|
|
||||||
gst_gl_display_get_gl_context_for_thread (mix->display, NULL);
|
|
||||||
if (!mix->context) {
|
|
||||||
if (!gst_gl_display_create_context (mix->display,
|
|
||||||
mix->priv->other_context, &mix->context, &error)) {
|
|
||||||
GST_OBJECT_UNLOCK (mix->display);
|
|
||||||
goto context_error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while (!gst_gl_display_add_context (mix->display, mix->context));
|
|
||||||
}
|
}
|
||||||
GST_OBJECT_UNLOCK (mix->display);
|
|
||||||
|
|
||||||
if (new_context || !mix->priv->gl_started) {
|
if (new_context || !mix->priv->gl_started) {
|
||||||
if (mix->priv->gl_started)
|
if (mix->priv->gl_started)
|
||||||
|
|
Loading…
Reference in a new issue