diff options
author | Justin Kim <justin.kim@collabora.com> | 2015-08-21 14:07:32 +0900 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2015-08-21 18:14:15 +1000 |
commit | 85834d6bbc79fe7b88dbff388746b2ff80b1ad75 (patch) | |
tree | 6f566f8f411e55909745a6271915eefa3ba78401 /gst-libs | |
parent | 04b006cd12d24d71b3615a79f8b0889080f0c8cd (diff) | |
download | gstreamer-plugins-bad-85834d6bbc79fe7b88dbff388746b2ff80b1ad75.tar.gz |
glcontext: add specific error message when missing GL_SHADING_LANGUAGE_VERSION
GL_SHADING_LANGUAGE_VERSION was introduced since ES 2.0, but in some
android emulator doesn't support this feature. To prevent confusion for
developer, the error message need to be more clear.
https://bugzilla.gnome.org/show_bug.cgi?id=753905
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/gl/gstglcontext.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index 9ec30ca43..dcf206375 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -1118,13 +1118,18 @@ _create_context_info (GstGLContext * context, GstGLAPI gl_api, gint * gl_major, gl = context->gl_vtable; - if (!gl->GetString || !gl->GetString (GL_VERSION) - || !gl->GetString (GL_SHADING_LANGUAGE_VERSION)) { + if (!gl->GetString || !gl->GetString (GL_VERSION)) { g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED, "glGetString not defined or returned invalid value"); return FALSE; } + if (!gl->GetString (GL_SHADING_LANGUAGE_VERSION)) { + g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED, + "No GL shader support available"); + return FALSE; + } + GST_INFO_OBJECT (context, "GL_VERSION: %s", GST_STR_NULL ((const gchar *) gl->GetString (GL_VERSION))); GST_INFO_OBJECT (context, "GL_SHADING_LANGUAGE_VERSION: %s", |