mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
gl: silence a critical if upstream does not provide us with meta params
This commit is contained in:
parent
fa4ce072ee
commit
faa94a8737
3 changed files with 69 additions and 63 deletions
|
@ -627,6 +627,7 @@ gst_gl_test_src_decide_allocation (GstBaseSrc * basesrc, GstQuery * query)
|
|||
gchar *apis;
|
||||
|
||||
gst_query_parse_nth_allocation_meta (query, idx, &upload_meta_params);
|
||||
if (upload_meta_params) {
|
||||
if (gst_structure_get (upload_meta_params, "gst.gl.GstGLContext",
|
||||
GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
|
||||
GstGLContext *old = src->context;
|
||||
|
@ -641,8 +642,8 @@ gst_gl_test_src_decide_allocation (GstBaseSrc * basesrc, GstQuery * query)
|
|||
GstGLPlatform platform = GST_GL_PLATFORM_NONE;
|
||||
GstGLAPI gl_apis;
|
||||
|
||||
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s", handle,
|
||||
type, apis);
|
||||
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s",
|
||||
handle, type, apis);
|
||||
|
||||
if (g_strcmp0 (type, "glx") == 0)
|
||||
platform = GST_GL_PLATFORM_GLX;
|
||||
|
@ -655,6 +656,7 @@ gst_gl_test_src_decide_allocation (GstBaseSrc * basesrc, GstQuery * query)
|
|||
platform, gl_apis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!src->context) {
|
||||
src->context = gst_gl_context_new (src->display);
|
||||
|
|
|
@ -883,6 +883,7 @@ gst_gl_filter_decide_allocation (GstBaseTransform * trans, GstQuery * query)
|
|||
gchar *apis;
|
||||
|
||||
gst_query_parse_nth_allocation_meta (query, idx, &upload_meta_params);
|
||||
if (upload_meta_params) {
|
||||
if (gst_structure_get (upload_meta_params, "gst.gl.GstGLContext",
|
||||
GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
|
||||
GstGLContext *old = filter->context;
|
||||
|
@ -897,8 +898,8 @@ gst_gl_filter_decide_allocation (GstBaseTransform * trans, GstQuery * query)
|
|||
GstGLPlatform platform = GST_GL_PLATFORM_NONE;
|
||||
GstGLAPI gl_apis;
|
||||
|
||||
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s", handle,
|
||||
type, apis);
|
||||
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s",
|
||||
handle, type, apis);
|
||||
|
||||
if (g_strcmp0 (type, "glx") == 0)
|
||||
platform = GST_GL_PLATFORM_GLX;
|
||||
|
@ -911,6 +912,7 @@ gst_gl_filter_decide_allocation (GstBaseTransform * trans, GstQuery * query)
|
|||
platform, gl_apis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!other_context)
|
||||
other_context = filter->other_context;
|
||||
|
|
|
@ -1117,6 +1117,7 @@ gst_gl_mixer_decide_allocation (GstGLMixer * mix, GstQuery * query)
|
|||
gchar *apis;
|
||||
|
||||
gst_query_parse_nth_allocation_meta (query, idx, &upload_meta_params);
|
||||
if (upload_meta_params) {
|
||||
if (gst_structure_get (upload_meta_params, "gst.gl.GstGLContext",
|
||||
GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
|
||||
GstGLContext *old = mix->context;
|
||||
|
@ -1131,8 +1132,8 @@ gst_gl_mixer_decide_allocation (GstGLMixer * mix, GstQuery * query)
|
|||
GstGLPlatform platform = GST_GL_PLATFORM_NONE;
|
||||
GstGLAPI gl_apis;
|
||||
|
||||
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s", handle,
|
||||
type, apis);
|
||||
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s",
|
||||
handle, type, apis);
|
||||
|
||||
if (g_strcmp0 (type, "glx") == 0)
|
||||
platform = GST_GL_PLATFORM_GLX;
|
||||
|
@ -1145,6 +1146,7 @@ gst_gl_mixer_decide_allocation (GstGLMixer * mix, GstQuery * query)
|
|||
platform, gl_apis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!mix->context) {
|
||||
mix->context = gst_gl_context_new (mix->display);
|
||||
|
|
Loading…
Reference in a new issue