[vlc-commits] vout_ios: implement gl.getProcAddress

Felix Paul Kühne git at videolan.org
Fri May 4 17:56:17 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri May  4 17:56:05 2012 +0200| [e0cea4052b5419085562890a8cf3c31d2b4c78c4] | committer: Felix Paul Kühne

vout_ios: implement gl.getProcAddress

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

 modules/video_output/ios.m |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index b35748b..c5fc9d2 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -28,7 +28,8 @@
 #import <UIKit/UIKit.h>
 #import <OpenGLES/ES1/gl.h>
 #import <OpenGLES/ES1/glext.h>
-#include <QuartzCore/QuartzCore.h>
+#import <QuartzCore/QuartzCore.h>
+#import <dlfcn.h>
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -54,6 +55,8 @@ static void PictureRender(vout_display_t *vd, picture_t *pic, subpicture_t *subp
 static void PictureDisplay(vout_display_t *vd, picture_t *pic, subpicture_t *subpicture);
 static int Control (vout_display_t *vd, int query, va_list ap);
 
+static void *OurGetProcAddress(vlc_gl_t *, const char *);
+
 static int OpenglClean(vlc_gl_t *gl);
 static void OpenglSwap(vlc_gl_t *gl);
 
@@ -101,6 +104,13 @@ struct vout_display_sys_t
     bool has_first_frame;
 };
 
+static void *OurGetProcAddress(vlc_gl_t *gl, const char *name)
+{
+    VLC_UNUSED(gl);
+
+    return dlsym(RTLD_MAIN_ONLY, name);
+}
+
 // Called from vout thread
 static int Open(vlc_object_t *this)
 {
@@ -148,7 +158,7 @@ static int Open(vlc_object_t *this)
     sys->gl.lock = OpenglClean; // We don't do locking, but sometimes we need to cleanup the framebuffer
     sys->gl.unlock = NULL;
     sys->gl.swap = OpenglSwap;
-	sys->gl.getProcAddress = NULL;
+	sys->gl.getProcAddress = OurGetProcAddress;
     sys->gl.sys = sys;
 
 	sys->vgl = vout_display_opengl_New(&vd->fmt, NULL, &sys->gl);



More information about the vlc-commits mailing list