1 /*****************************************************************************
2 * macosx.m: Mac OS X module for vlc
3 *****************************************************************************
4 * Copyright (C) 2001-2011 the VideoLAN team
7 * Authors: Colin Delacroix <colin@zoy.org>
8 * Eugenio Jarosiewicz <ej0@cise.ufl.edu>
9 * Florian G. Pflug <fgp@phlo.org>
10 * Jon Lech Johansen <jon-vl@nanocrew.net>
11 * Felix Paul Kühne <fkuehne at videolan dot org>
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
27 *****************************************************************************/
29 /*****************************************************************************
31 *****************************************************************************/
32 #include <stdlib.h> /* malloc(), free() */
39 #include <vlc_common.h>
40 #include <vlc_plugin.h>
42 /*****************************************************************************
44 *****************************************************************************/
45 int OpenIntf ( vlc_object_t * );
46 void CloseIntf ( vlc_object_t * );
48 int OpenVideoGL ( vlc_object_t * );
49 void CloseVideoGL ( vlc_object_t * );
51 /*****************************************************************************
53 *****************************************************************************/
54 #define VDEV_TEXT N_("Video device")
55 #define VDEV_LONGTEXT N_("Number of the screen to use by default to display " \
56 "videos in 'fullscreen'. The screen number correspondance can be found in "\
57 "the video device selection menu.")
59 #define OPAQUENESS_TEXT N_("Opaqueness")
60 #define OPAQUENESS_LONGTEXT N_( "Set the transparency of the video output. 1 is non-transparent (default) " \
61 "0 is fully transparent.")
63 #define STRETCH_TEXT N_("Stretch video to fill window")
64 #define STRETCH_LONGTEXT N_("Stretch the video to fill the entire window when "\
65 "resizing the video instead of keeping the aspect ratio and "\
66 "displaying black borders.")
68 #define BLACK_TEXT N_("Black screens in fullscreen")
69 #define BLACK_LONGTEXT N_("In fullscreen mode, keep screen where there is no " \
70 "video displayed black" )
72 #define BACKGROUND_TEXT N_("Use as Desktop Background")
73 #define BACKGROUND_LONGTEXT N_("Use the video as the Desktop Background " \
74 "Desktop icons cannot be interacted with in this mode." )
76 #define FSPANEL_TEXT N_("Show Fullscreen controller")
77 #define FSPANEL_LONGTEXT N_("Shows a lucent controller when moving the mouse " \
78 "in fullscreen mode.")
80 #define AUTOPLAY_OSX_TEST N_("Auto-playback of new items")
81 #define AUTOPLAY_OSX_LONGTEXT N_("Start playback of new items immediately " \
82 "once they were added." )
84 #define RECENT_ITEMS_TEXT N_("Keep Recent Items")
85 #define RECENT_ITEMS_LONGTEXT N_("By default, VLC keeps a list of the last 10 items. " \
86 "This feature can be disabled here.")
88 #define EQ_KEEP_TEXT N_("Keep current Equalizer settings")
89 #define EQ_KEEP_LONGTEXT N_("By default, VLC keeps the last equalizer settings before " \
90 "termination. This feature can be disabled here.")
92 #define USE_APPLE_REMOTE_TEXT N_("Control playback with the Apple Remote")
93 #define USE_APPLE_REMOTE_LONGTEXT N_("By default, VLC can be remotely controlled with the Apple Remote.")
95 #define USE_MEDIAKEYS_TEXT N_("Control playback with media keys")
96 #define USE_MEDIAKEYS_LONGTEXT N_("By default, VLC can be controlled using the media keys on modern Apple " \
100 set_description( N_("Mac OS X interface") )
101 set_capability( "interface", 200 )
102 set_callbacks( OpenIntf, CloseIntf )
103 set_category( CAT_INTERFACE )
104 set_subcategory( SUBCAT_INTERFACE_MAIN )
105 cannot_unload_broken_library( )
106 add_bool( "macosx-autoplay", true, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT,
108 add_bool( "macosx-recentitems", true, RECENT_ITEMS_TEXT, RECENT_ITEMS_LONGTEXT,
110 add_bool( "macosx-eq-keep", true, EQ_KEEP_TEXT, EQ_KEEP_LONGTEXT,
112 add_bool( "macosx-fspanel", true, FSPANEL_TEXT, FSPANEL_LONGTEXT,
114 add_bool( "macosx-appleremote", true, USE_APPLE_REMOTE_TEXT, USE_APPLE_REMOTE_LONGTEXT,
116 add_bool( "macosx-mediakeys", true, USE_MEDIAKEYS_TEXT, USE_MEDIAKEYS_LONGTEXT,
120 set_description( "Mac OS X OpenGL" )
121 set_capability( "opengl provider", 100 )
122 set_category( CAT_VIDEO)
123 set_subcategory( SUBCAT_VIDEO_VOUT )
124 // set_callbacks( OpenVideoGL, CloseVideoGL )
126 add_integer( "macosx-vdev", 0, VDEV_TEXT, VDEV_LONGTEXT,
128 add_bool( "macosx-stretch", false, STRETCH_TEXT, STRETCH_LONGTEXT,
130 add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL,
131 OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, true );
132 add_bool( "macosx-black", true, BLACK_TEXT, BLACK_LONGTEXT,
134 add_bool( "macosx-background", false, BACKGROUND_TEXT, BACKGROUND_LONGTEXT,