[vlc-commits] macosx: fail the video output if Quartz Extreme isn't supported, removed specific options, which are now handled by the core

Felix Paul Kühne git at videolan.org
Wed Aug 10 18:44:54 CEST 2011


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Aug 10 16:43:37 2011 +0200| [92ed0b95a0c00503380c2617e8cd302bd4cc6292] | committer: Felix Paul Kühne

macosx: fail the video output if Quartz Extreme isn't supported, removed specific options, which are now handled by the core

QE is supported on virtually any Mac is running 10.5+ except for broken Hackintoshes

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

 modules/gui/macosx/macosx.m   |   16 ----------------
 modules/video_output/macosx.m |   10 ++++++++++
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/modules/gui/macosx/macosx.m b/modules/gui/macosx/macosx.m
index 93615f7..5d37586 100644
--- a/modules/gui/macosx/macosx.m
+++ b/modules/gui/macosx/macosx.m
@@ -49,9 +49,6 @@ void CloseIntf    ( vlc_object_t * );
 int  WindowOpen   ( vout_window_t *, const vout_window_cfg_t * );
 void WindowClose  ( vout_window_t * );
 
-int  OpenVideoGL  ( vlc_object_t * );
-void CloseVideoGL ( vlc_object_t * );
-
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
@@ -64,19 +61,10 @@ void CloseVideoGL ( vlc_object_t * );
 #define OPAQUENESS_LONGTEXT N_( "Set the transparency of the video output. 1 is non-transparent (default) " \
                                 "0 is fully transparent.")
 
-#define STRETCH_TEXT N_("Stretch video to fill window")
-#define STRETCH_LONGTEXT N_("Stretch the video to fill the entire window when "\
-                            "resizing the video instead of keeping the aspect ratio and "\
-                            "displaying black borders.")
-
 #define BLACK_TEXT N_("Black screens in fullscreen")
 #define BLACK_LONGTEXT N_("In fullscreen mode, keep screen where there is no " \
                           "video displayed black" )
 
-#define BACKGROUND_TEXT N_("Use as Desktop Background")
-#define BACKGROUND_LONGTEXT N_("Use the video as the Desktop Background " \
-                               "Desktop icons cannot be interacted with in this mode." )
-
 #define FSPANEL_TEXT N_("Show Fullscreen controller")
 #define FSPANEL_LONGTEXT N_("Shows a lucent controller when moving the mouse " \
                             "in fullscreen mode.")
@@ -132,13 +120,9 @@ vlc_module_begin ()
 
         add_integer( "macosx-vdev", 0, VDEV_TEXT, VDEV_LONGTEXT,
                      false )
-        add_bool( "macosx-stretch", false, STRETCH_TEXT, STRETCH_LONGTEXT,
-                  false )
         add_float_with_range( "macosx-opaqueness", 1, 0, 1,
                               OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, true );
         add_bool( "macosx-black", true, BLACK_TEXT, BLACK_LONGTEXT,
                   false )
-        add_bool( "macosx-background", false, BACKGROUND_TEXT, BACKGROUND_LONGTEXT,
-                  false )
 vlc_module_end ()
 
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 19fa96f..608ddaa 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -44,6 +44,7 @@
 #include <vlc_plugin.h>
 #include <vlc_vout_display.h>
 #include <vlc_opengl.h>
+#include <vlc_dialog.h>
 #include "opengl.h"
 
 /**
@@ -117,6 +118,15 @@ static int Open(vlc_object_t *this)
     if (!sys)
         return VLC_ENOMEM;
 
+    if( !CGDisplayUsesOpenGLAcceleration( kCGDirectMainDisplay ) )
+    {
+        msg_Err( this, "no OpenGL hardware acceleration found, video output will fail" );
+        dialog_Fatal( this, _("Video output is not supported"), _("Your Mac lacks Quartz Extreme acceleration, which is required for video output.") );
+        return VLC_EGENERIC;
+    }
+    else
+        msg_Dbg( this, "Quartz Extreme acceleration is active" );
+
     vd->sys = sys;
     sys->pool = NULL;
     sys->gl.sys = NULL;



More information about the vlc-commits mailing list