• Home
  • Raw
  • Download

Lines Matching refs:ctxh

23 _find_local_gl_context (GstGLContextHelper * ctxh)  in _find_local_gl_context()  argument
27 gst_gl_query_local_gl_context (GST_ELEMENT (ctxh->element), GST_PAD_SRC, in _find_local_gl_context()
36 GstGLContextHelper *ctxh = g_new0 (GstGLContextHelper, 1); in gst_gl_context_helper_new() local
37 ctxh->element = gst_object_ref (element); in gst_gl_context_helper_new()
39 return ctxh; in gst_gl_context_helper_new()
43 gst_gl_context_helper_free (GstGLContextHelper * ctxh) in gst_gl_context_helper_free() argument
45 g_return_if_fail (ctxh != NULL); in gst_gl_context_helper_free()
47 gst_object_unref (ctxh->element); in gst_gl_context_helper_free()
49 if (ctxh->display) in gst_gl_context_helper_free()
50 gst_object_unref (ctxh->display); in gst_gl_context_helper_free()
52 if (ctxh->context) in gst_gl_context_helper_free()
53 gst_object_unref (ctxh->context); in gst_gl_context_helper_free()
55 if (ctxh->other_context) in gst_gl_context_helper_free()
56 gst_object_unref (ctxh->other_context); in gst_gl_context_helper_free()
58 g_free (ctxh); in gst_gl_context_helper_free()
62 gst_gl_context_helper_ensure_context (GstGLContextHelper * ctxh) in gst_gl_context_helper_ensure_context() argument
67 g_return_if_fail (ctxh != NULL); in gst_gl_context_helper_ensure_context()
69 if (!ctxh->display) in gst_gl_context_helper_ensure_context()
70 gst_gl_ensure_element_data (ctxh->element, &ctxh->display, in gst_gl_context_helper_ensure_context()
71 &ctxh->other_context); in gst_gl_context_helper_ensure_context()
73 if (!ctxh->display) in gst_gl_context_helper_ensure_context()
76 context = _find_local_gl_context (ctxh); in gst_gl_context_helper_ensure_context()
78 GST_INFO_OBJECT (ctxh->element, "found local context %p, old context %p", in gst_gl_context_helper_ensure_context()
79 context, ctxh->context); in gst_gl_context_helper_ensure_context()
80 if (ctxh->context) in gst_gl_context_helper_ensure_context()
81 gst_object_unref (ctxh->context); in gst_gl_context_helper_ensure_context()
82 ctxh->context = context; in gst_gl_context_helper_ensure_context()
85 if (!ctxh->context) { in gst_gl_context_helper_ensure_context()
86 GST_OBJECT_LOCK (ctxh->display); in gst_gl_context_helper_ensure_context()
88 if (ctxh->context) in gst_gl_context_helper_ensure_context()
89 gst_object_unref (ctxh->context); in gst_gl_context_helper_ensure_context()
90 ctxh->context = in gst_gl_context_helper_ensure_context()
91 gst_gl_display_get_gl_context_for_thread (ctxh->display, NULL); in gst_gl_context_helper_ensure_context()
92 if (!ctxh->context) { in gst_gl_context_helper_ensure_context()
93 if (!gst_gl_display_create_context (ctxh->display, in gst_gl_context_helper_ensure_context()
94 ctxh->other_context, &ctxh->context, &error)) { in gst_gl_context_helper_ensure_context()
95 GST_OBJECT_UNLOCK (ctxh->display); in gst_gl_context_helper_ensure_context()
99 } while (!gst_gl_display_add_context (ctxh->display, ctxh->context)); in gst_gl_context_helper_ensure_context()
100 GST_OBJECT_UNLOCK (ctxh->display); in gst_gl_context_helper_ensure_context()
107 GST_ELEMENT_ERROR (ctxh->element, RESOURCE, NOT_FOUND, ("%s", in gst_gl_context_helper_ensure_context()
116 GST_ELEMENT_ERROR (ctxh->element, RESOURCE, NOT_FOUND, in gst_gl_context_helper_ensure_context()