[vlc-devel] commit: Hack to fix the compilation on 10.4. This should actually be covered by configure, which complains about missing headers, but doesn' t disable this module properly. ( Felix Paul Kühne )

git version control git at videolan.org
Sun Apr 27 22:39:29 CEST 2008


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Apr 27 22:10:44 2008 +0200| [3196a099a488880b4ad878b3f5e248fad31a59c7]

Hack to fix the compilation on 10.4. This should actually be covered by configure, which complains about missing headers, but doesn't disable this module properly.

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

 modules/video_output/opengllayer.m |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/modules/video_output/opengllayer.m b/modules/video_output/opengllayer.m
index 38556d9..bb31d25 100644
--- a/modules/video_output/opengllayer.m
+++ b/modules/video_output/opengllayer.m
@@ -43,6 +43,8 @@
 #import <Cocoa/Cocoa.h>
 #import <OpenGL/OpenGL.h>
 
+#ifdef CALayer
+
 /* On OS X, use GL_TEXTURE_RECTANGLE_EXT instead of GL_TEXTURE_2D.
    This allows sizes which are not powers of 2 */
 #define VLCGL_TARGET GL_TEXTURE_RECTANGLE_EXT
@@ -134,6 +136,24 @@ struct vout_sys_t
  *****************************************************************************/
 static int CreateVout( vlc_object_t *p_this )
 {
+    /* This module is Leopard only */
+#ifdef __APPLE__
+    long minorMacVersion;
+    if( Gestalt( gestaltSystemVersionMinor, &minorMacVersion ) == noErr )
+    {
+        if( minorMacVersion < 6 )
+        {
+            msg_Warn( p_vout, "current osx version is 10.%ld, non-suitable for OpenglLayer video output", minorMacVersion );
+            return VLC_ENOOBJ;
+        }
+    }
+    else
+    {
+        msg_Warn( p_vout, "couldn't get OS version" );
+        return VLC_EGENERIC;
+    }
+#endif
+
     vout_thread_t *p_vout = (vout_thread_t *)p_this;
     vout_sys_t *p_sys;
     char * psz;
@@ -515,3 +535,5 @@ static int InitTextures( vout_thread_t *p_vout )
     CGLUnlockContext( glContext );
 }
 @end
+
+#endif




More information about the vlc-devel mailing list