[vlc-devel] [PATCH 2/4] interop_cvpx: use ios-eaglcontext from the global state

Alexandre Janniaux ajanni at videolabs.io
Fri Nov 6 13:26:39 CET 2020


---
 modules/video_output/Makefile.am           | 1 +
 modules/video_output/opengl/interop_cvpx.m | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 06d2e9bb74..efd3201815 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -45,6 +45,7 @@ vout_LTLIBRARIES += libvout_macosx_plugin.la libcaopengllayer_plugin.la \
 endif
 if HAVE_IOS
 libglinterop_cvpx_plugin_la_CFLAGS = $(AM_CFLAGS) -DUSE_OPENGL_ES2
+libglinterop_cvpx_plugin_la_LDFLAGS += -Wl,-framework,IOSurface,-framework,OpenGLES
 endif
 
 libvout_ios_plugin_la_SOURCES = video_output/ios.m
diff --git a/modules/video_output/opengl/interop_cvpx.m b/modules/video_output/opengl/interop_cvpx.m
index b7c0b47672..a432c47815 100644
--- a/modules/video_output/opengl/interop_cvpx.m
+++ b/modules/video_output/opengl/interop_cvpx.m
@@ -184,10 +184,10 @@ Open(vlc_object_t *obj)
     const GLenum tex_target = GL_TEXTURE_2D;
 
     {
-        CVEAGLContext eagl_ctx = var_InheritAddress(interop->gl, "ios-eaglcontext");
+        CVEAGLContext eagl_ctx = [EAGLContext currentContext];
         if (!eagl_ctx)
         {
-            msg_Err(interop->gl, "can't find ios-eaglcontext");
+            msg_Warn(&interop->obj, "OpenGL provider is not using CAEAGL, cannot use interop_cvpx");
             free(priv);
             return VLC_EGENERIC;
         }
-- 
2.29.2



More information about the vlc-devel mailing list