mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 14:38:48 +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;
|
gchar *apis;
|
||||||
|
|
||||||
gst_query_parse_nth_allocation_meta (query, idx, &upload_meta_params);
|
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",
|
if (gst_structure_get (upload_meta_params, "gst.gl.GstGLContext",
|
||||||
GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
|
GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
|
||||||
GstGLContext *old = src->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;
|
GstGLPlatform platform = GST_GL_PLATFORM_NONE;
|
||||||
GstGLAPI gl_apis;
|
GstGLAPI gl_apis;
|
||||||
|
|
||||||
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s", handle,
|
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s",
|
||||||
type, apis);
|
handle, type, apis);
|
||||||
|
|
||||||
if (g_strcmp0 (type, "glx") == 0)
|
if (g_strcmp0 (type, "glx") == 0)
|
||||||
platform = GST_GL_PLATFORM_GLX;
|
platform = GST_GL_PLATFORM_GLX;
|
||||||
|
@ -655,6 +656,7 @@ gst_gl_test_src_decide_allocation (GstBaseSrc * basesrc, GstQuery * query)
|
||||||
platform, gl_apis);
|
platform, gl_apis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!src->context) {
|
if (!src->context) {
|
||||||
src->context = gst_gl_context_new (src->display);
|
src->context = gst_gl_context_new (src->display);
|
||||||
|
|
|
@ -883,6 +883,7 @@ gst_gl_filter_decide_allocation (GstBaseTransform * trans, GstQuery * query)
|
||||||
gchar *apis;
|
gchar *apis;
|
||||||
|
|
||||||
gst_query_parse_nth_allocation_meta (query, idx, &upload_meta_params);
|
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",
|
if (gst_structure_get (upload_meta_params, "gst.gl.GstGLContext",
|
||||||
GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
|
GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
|
||||||
GstGLContext *old = filter->context;
|
GstGLContext *old = filter->context;
|
||||||
|
@ -897,8 +898,8 @@ gst_gl_filter_decide_allocation (GstBaseTransform * trans, GstQuery * query)
|
||||||
GstGLPlatform platform = GST_GL_PLATFORM_NONE;
|
GstGLPlatform platform = GST_GL_PLATFORM_NONE;
|
||||||
GstGLAPI gl_apis;
|
GstGLAPI gl_apis;
|
||||||
|
|
||||||
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s", handle,
|
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s",
|
||||||
type, apis);
|
handle, type, apis);
|
||||||
|
|
||||||
if (g_strcmp0 (type, "glx") == 0)
|
if (g_strcmp0 (type, "glx") == 0)
|
||||||
platform = GST_GL_PLATFORM_GLX;
|
platform = GST_GL_PLATFORM_GLX;
|
||||||
|
@ -911,6 +912,7 @@ gst_gl_filter_decide_allocation (GstBaseTransform * trans, GstQuery * query)
|
||||||
platform, gl_apis);
|
platform, gl_apis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!other_context)
|
if (!other_context)
|
||||||
other_context = filter->other_context;
|
other_context = filter->other_context;
|
||||||
|
|
|
@ -1117,6 +1117,7 @@ gst_gl_mixer_decide_allocation (GstGLMixer * mix, GstQuery * query)
|
||||||
gchar *apis;
|
gchar *apis;
|
||||||
|
|
||||||
gst_query_parse_nth_allocation_meta (query, idx, &upload_meta_params);
|
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",
|
if (gst_structure_get (upload_meta_params, "gst.gl.GstGLContext",
|
||||||
GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
|
GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
|
||||||
GstGLContext *old = mix->context;
|
GstGLContext *old = mix->context;
|
||||||
|
@ -1131,8 +1132,8 @@ gst_gl_mixer_decide_allocation (GstGLMixer * mix, GstQuery * query)
|
||||||
GstGLPlatform platform = GST_GL_PLATFORM_NONE;
|
GstGLPlatform platform = GST_GL_PLATFORM_NONE;
|
||||||
GstGLAPI gl_apis;
|
GstGLAPI gl_apis;
|
||||||
|
|
||||||
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s", handle,
|
GST_DEBUG ("got GL context handle 0x%p with type %s and apis %s",
|
||||||
type, apis);
|
handle, type, apis);
|
||||||
|
|
||||||
if (g_strcmp0 (type, "glx") == 0)
|
if (g_strcmp0 (type, "glx") == 0)
|
||||||
platform = GST_GL_PLATFORM_GLX;
|
platform = GST_GL_PLATFORM_GLX;
|
||||||
|
@ -1145,6 +1146,7 @@ gst_gl_mixer_decide_allocation (GstGLMixer * mix, GstQuery * query)
|
||||||
platform, gl_apis);
|
platform, gl_apis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!mix->context) {
|
if (!mix->context) {
|
||||||
mix->context = gst_gl_context_new (mix->display);
|
mix->context = gst_gl_context_new (mix->display);
|
||||||
|
|
Loading…
Reference in a new issue