[vlc-commits] opengl: interop_android: disable if GL_OES_EGL_image_external is unavailable

Alexandre Janniaux git at videolan.org
Wed Nov 18 09:22:52 CET 2020


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Wed Oct 28 10:17:35 2020 +0100| [e13bc451d448b5b9451afedeec7db3e6650215ef] | committer: Alexandre Janniaux

opengl: interop_android: disable if GL_OES_EGL_image_external is unavailable

The necessary symbols are typically existing when running inside
renderdoc tracing environnement but the extension is not exposed in
renderdoc since it doesn't support it.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e13bc451d448b5b9451afedeec7db3e6650215ef
---

 modules/video_output/opengl/interop_android.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/video_output/opengl/interop_android.c b/modules/video_output/opengl/interop_android.c
index c5f654b95b..cc82455e47 100644
--- a/modules/video_output/opengl/interop_android.c
+++ b/modules/video_output/opengl/interop_android.c
@@ -30,6 +30,7 @@
 #include <vlc_plugin.h>
 #include "interop.h"
 #include "../android/utils.h"
+#include "gl_api.h"
 
 struct priv
 {
@@ -113,6 +114,14 @@ Open(vlc_object_t *obj)
      || !interop->vctx)
         return VLC_EGENERIC;
 
+    const char *extensions = interop->api->vt.GetString(GL_EXTENSIONS);
+    if (!vlc_gl_StrHasToken(extensions, "GL_OES_EGL_image_external"))
+    {
+        msg_Warn(&interop->obj, "GL_OES_EGL_image_external is not available,"
+                " disabling android interop.");
+        return VLC_EGENERIC;
+    }
+
     android_video_context_t *avctx =
         vlc_video_context_GetPrivate(interop->vctx, VLC_VIDEO_CONTEXT_AWINDOW);
 



More information about the vlc-commits mailing list