mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 15:22:11 +02:00
Sink: inform about used OpenGL(ES) version
This commit is contained in:
@@ -800,6 +800,23 @@ gtk_clapper_gl_widget_set_buffer (GtkClapperGLWidget * clapper_widget,
|
||||
GTK_CLAPPER_GL_WIDGET_UNLOCK (clapper_widget);
|
||||
}
|
||||
|
||||
static GstGLAPI
|
||||
_get_current_gl_api (GstGLPlatform platform)
|
||||
{
|
||||
GstGLAPI gl_api = GST_GL_API_NONE;
|
||||
guint gl_major = 0, gl_minor = 0;
|
||||
|
||||
gl_api = gst_gl_context_get_current_gl_api (platform, &gl_major, &gl_minor);
|
||||
|
||||
if (gl_api) {
|
||||
const gboolean is_es = gl_api & (GST_GL_API_GLES1 | GST_GL_API_GLES2);
|
||||
|
||||
GST_INFO ("Using OpenGL%s %d.%d", is_es ? " ES" : "", gl_major, gl_minor);
|
||||
}
|
||||
|
||||
return gl_api;
|
||||
}
|
||||
|
||||
static void
|
||||
_get_gl_context (GtkClapperGLWidget * clapper_widget)
|
||||
{
|
||||
@@ -848,7 +865,7 @@ _get_gl_context (GtkClapperGLWidget * clapper_widget)
|
||||
#endif
|
||||
|
||||
if (gl_handle) {
|
||||
gl_api = gst_gl_context_get_current_gl_api (platform, NULL, NULL);
|
||||
gl_api = _get_current_gl_api (platform);
|
||||
priv->other_context =
|
||||
gst_gl_context_new_wrapped (priv->display, gl_handle,
|
||||
platform, gl_api);
|
||||
@@ -858,7 +875,7 @@ _get_gl_context (GtkClapperGLWidget * clapper_widget)
|
||||
#if GST_GL_HAVE_WINDOW_WAYLAND && GST_GL_HAVE_PLATFORM_EGL && defined (GDK_WINDOWING_WAYLAND)
|
||||
if (GST_IS_GL_DISPLAY_WAYLAND (priv->display)) {
|
||||
platform = GST_GL_PLATFORM_EGL;
|
||||
gl_api = gst_gl_context_get_current_gl_api (platform, NULL, NULL);
|
||||
gl_api = _get_current_gl_api (platform);
|
||||
gl_handle = gst_gl_context_get_current_gl_context (platform);
|
||||
if (gl_handle)
|
||||
priv->other_context =
|
||||
|
Reference in New Issue
Block a user