osxvideosink: check for deprecated constants prior to OSX 10.10
authorJulien Isorce <j.isorce@samsung.com>
Tue, 24 Mar 2015 23:15:15 +0000 (23:15 +0000)
committerJulien Isorce <j.isorce@samsung.com>
Tue, 24 Mar 2015 23:16:26 +0000 (23:16 +0000)
cocoawindow.m:339:5: error: 'NSOpenGLPFAWindow'
is deprecated: first deprecated in OS X 10.9

cocoawindow.m:576:7: error: 'NSOpenGLPFAFullScreen'
is deprecated: first deprecated in OS X 10.6

cocoawindow.m:605:24: error: 'setFullScreen'
is deprecated: first deprecated in OS X 10.7

sys/osxvideo/cocoawindow.m

index 57d19a9..71e1ca0 100644 (file)
@@ -336,7 +336,9 @@ const gchar* gst_keycode_to_keyname(gint16 keycode)
     NSOpenGLPFAColorSize, 24,
     NSOpenGLPFAAlphaSize, 8,
     NSOpenGLPFADepthSize, 24,
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1090
     NSOpenGLPFAWindow,
+#endif
     0
   };
 
@@ -573,7 +575,9 @@ const gchar* gst_keycode_to_keyname(gint16 keycode)
       NSOpenGLPFAColorSize, 24,
       NSOpenGLPFAAlphaSize, 8,
       NSOpenGLPFADepthSize, 24,
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
       NSOpenGLPFAFullScreen,
+#endif
       NSOpenGLPFAScreenMask,
       CGDisplayIDToOpenGLDisplayMask (kCGDirectMainDisplay),
       0
@@ -602,7 +606,9 @@ const gchar* gst_keycode_to_keyname(gint16 keycode)
       GST_WARNING ("CGCaptureAllDisplays() failed");
       return;
     }
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
     [fullScreenContext setFullScreen];
+#endif
     [fullScreenContext makeCurrentContext];
 
     fullscreen = YES;