summaryrefslogtreecommitdiff
path: root/gst-libs/gst/gl/egl
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-11-17 01:45:38 +1100
committerMatthew Waters <matthew@centricular.com>2016-11-17 14:06:21 +1100
commitf2e9190229094cd5b329dfb12aa8cd6468c19cbc (patch)
treebc6886658ab3655c6fd01642ecd85c8773298184 /gst-libs/gst/gl/egl
parentd42145e8c1ba3bc0445506b92bb7ac04ae98f4dd (diff)
downloadgstreamer-plugins-bad-f2e9190229094cd5b329dfb12aa8cd6468c19cbc.tar.gz
glcontext: add vfunc to retrieve the OpenGL platform version
i.e. the version of EGL, GLX, etc implemented. https://bugzilla.gnome.org/show_bug.cgi?id=774518
Diffstat (limited to 'gst-libs/gst/gl/egl')
-rw-r--r--gst-libs/gst/gl/egl/gstglcontext_egl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.c b/gst-libs/gst/gl/egl/gstglcontext_egl.c
index 3ed7320bd..78c14a367 100644
--- a/gst-libs/gst/gl/egl/gstglcontext_egl.c
+++ b/gst-libs/gst/gl/egl/gstglcontext_egl.c
@@ -64,6 +64,8 @@ static GstGLPlatform gst_gl_context_egl_get_gl_platform (GstGLContext *
context);
static gboolean gst_gl_context_egl_check_feature (GstGLContext * context,
const gchar * feature);
+static void gst_gl_context_egl_get_gl_platform_version (GstGLContext * context,
+ gint * major, gint * minor);
G_DEFINE_TYPE (GstGLContextEGL, gst_gl_context_egl, GST_TYPE_GL_CONTEXT);
@@ -93,6 +95,8 @@ gst_gl_context_egl_class_init (GstGLContextEGLClass * klass)
GST_DEBUG_FUNCPTR (gst_gl_context_egl_check_feature);
context_class->get_current_context =
GST_DEBUG_FUNCPTR (gst_gl_context_egl_get_current_context);
+ context_class->get_gl_platform_version =
+ GST_DEBUG_FUNCPTR (gst_gl_context_egl_get_gl_platform_version);
}
static void
@@ -801,3 +805,13 @@ gst_gl_context_egl_get_current_context (void)
{
return (guintptr) eglGetCurrentContext ();
}
+
+static void
+gst_gl_context_egl_get_gl_platform_version (GstGLContext * context,
+ gint * major, gint * minor)
+{
+ GstGLContextEGL *context_egl = GST_GL_CONTEXT_EGL (context);
+
+ *major = context_egl->egl_major;
+ *minor = context_egl->egl_minor;
+}