]> git.sesse.net Git - vlc/blob - modules/gui/macosx/macosx.m
macosx/CAS: add MKV to the black list for HTTP streaming
[vlc] / modules / gui / macosx / macosx.m
1 /*****************************************************************************
2  * macosx.m: Mac OS X module for vlc
3  *****************************************************************************
4  * Copyright (C) 2001-2012 VLC authors and VideoLAN
5  * $Id$
6  *
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>
12  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
26  *****************************************************************************/
27
28 /*****************************************************************************
29  * Preamble
30  *****************************************************************************/
31 #include <stdlib.h>                                      /* malloc(), free() */
32 #include <string.h>
33
34 #ifdef HAVE_CONFIG_H
35 # include "config.h"
36 #endif
37
38 #include <vlc_common.h>
39 #include <vlc_plugin.h>
40 #include <vlc_vout_window.h>
41
42 /*****************************************************************************
43  * External prototypes
44  *****************************************************************************/
45 int  OpenIntf     (vlc_object_t *);
46 void CloseIntf    (vlc_object_t *);
47
48 int  WindowOpen   (vout_window_t *, const vout_window_cfg_t *);
49 void WindowClose  (vout_window_t *);
50
51 /*****************************************************************************
52  * Module descriptor
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.")
58
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.")
62
63 #define BLACK_TEXT N_("Black screens in fullscreen")
64 #define BLACK_LONGTEXT N_("In fullscreen mode, keep screen where there is no " \
65                           "video displayed black")
66
67 #define FSPANEL_TEXT N_("Show Fullscreen controller")
68 #define FSPANEL_LONGTEXT N_("Shows a lucent controller when moving the mouse " \
69                             "in fullscreen mode.")
70
71 #define AUTOPLAY_OSX_TEST N_("Auto-playback of new items")
72 #define AUTOPLAY_OSX_LONGTEXT N_("Start playback of new items immediately " \
73                                  "once they were added.")
74
75 #define RECENT_ITEMS_TEXT N_("Keep Recent Items")
76 #define RECENT_ITEMS_LONGTEXT N_("By default, VLC keeps a list of the last 10 items. " \
77                                  "This feature can be disabled here.")
78
79 #define USE_APPLE_REMOTE_TEXT N_("Control playback with the Apple Remote")
80 #define USE_APPLE_REMOTE_LONGTEXT N_("By default, VLC can be remotely controlled with the Apple Remote.")
81
82 #define USE_APPLE_REMOTE_VOLUME_TEXT N_("Control system volume with the Apple Remote")
83 #define USE_APPLE_REMOTE_VOLUME_LONGTEXT N_("By default, VLC will control its own volume with the Apple Remote. However, you can choose to control the global system volume instead.")
84
85 #define USE_APPLE_REMOTE_PREVNEXT_TEXT N_("Control playlist items with the Apple Remote")
86 #define USE_APPLE_REMOTE_PREVNEXT_LONGTEXT N_("By default, VLC will allow you to switch to the next or previous item with the Apple Remote. Remote. You can disable this behavior with this option.")
87
88 #define USE_MEDIAKEYS_TEXT N_("Control playback with media keys")
89 #define USE_MEDIAKEYS_LONGTEXT N_("By default, VLC can be controlled using the media keys on modern Apple " \
90                                   "keyboards.")
91
92 #define INTERFACE_STYLE_TEXT N_("Run VLC with dark interface style")
93 #define INTERFACE_STYLE_LONGTEXT N_("By default, VLC will use the dark interface style.")
94
95 #define NATIVE_FULLSCREEN_MODE_ON_LION_TEXT N_("Use the native fullscreen mode")
96 #define NATIVE_FULLSCREEN_MODE_ON_LION_LONGTEXT N_("By default, VLC uses the fullscreen mode known from previous Mac OS X releases. It can also use the native fullscreen mode on Mac OS X 10.7 and later.")
97
98 #define KEEPSIZE_TEXT N_("Resize interface to the native video size")
99 #define KEEPSIZE_LONGTEXT N_("You have two choices:\n" \
100 " - The interface will resize to the native video size\n" \
101 " - The video will fit to the interface size\n " \
102 "By default, interface resize to the native video size.")
103
104 #define PAUSE_MINIMIZED_TEXT N_("Pause the video playback when minimized")
105 #define PAUSE_MINIMIZED_LONGTEXT N_(\
106 "With this option enabled, the playback will be automatically paused when minimizing the window.")
107
108 #define ICONCHANGE_TEXT N_("Allow automatic icon changes")
109 #define ICONCHANGE_LONGTEXT N_("This option allows the interface to change its icon on various occasions.")
110
111 #define LOCK_ASPECT_RATIO_TEXT N_("Lock Aspect Ratio")
112
113 #define JUMPBUTTONS_TEXT N_("Shows playlist item control buttons")
114 #define JUMPBUTTONS_LONGTEXT N_("Shows the previous and next buttons in the main window")
115
116 #define PLAYMODEBUTTONS_TEXT N_("Show play mode control buttons")
117 #define PLAYMODEBUTTONS_LONGTEXT N_("Shows the shuffle and repeat buttons in the main window")
118
119 #define SIDEBAR_TEXT N_("Show sidebar")
120 #define SIDEBAR_LONGTEXT N_("Shows a sidebar in the main window listing media sources")
121
122 vlc_module_begin ()
123     set_description(N_("Mac OS X interface"))
124     set_capability("interface", 200)
125     set_callbacks(OpenIntf, CloseIntf)
126     set_category(CAT_INTERFACE)
127     set_subcategory(SUBCAT_INTERFACE_MAIN)
128     cannot_unload_broken_library()
129     add_bool("macosx-autoplay", true, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT, false)
130     add_bool("macosx-recentitems", true, RECENT_ITEMS_TEXT, RECENT_ITEMS_LONGTEXT, false)
131     add_bool("macosx-fspanel", true, FSPANEL_TEXT, FSPANEL_LONGTEXT, false)
132     add_bool("macosx-appleremote", true, USE_APPLE_REMOTE_TEXT, USE_APPLE_REMOTE_LONGTEXT, false)
133     add_bool("macosx-appleremote-sysvol", false, USE_APPLE_REMOTE_VOLUME_TEXT, USE_APPLE_REMOTE_VOLUME_LONGTEXT, false)
134     add_bool("macosx-appleremote-prevnext", false, USE_APPLE_REMOTE_PREVNEXT_TEXT, USE_APPLE_REMOTE_PREVNEXT_LONGTEXT, false)
135     add_bool("macosx-mediakeys", true, USE_MEDIAKEYS_TEXT, USE_MEDIAKEYS_LONGTEXT, false)
136     add_bool("macosx-interfacestyle", false, INTERFACE_STYLE_TEXT, INTERFACE_STYLE_LONGTEXT, false)
137     add_bool("macosx-nativefullscreenmode", false, NATIVE_FULLSCREEN_MODE_ON_LION_TEXT, NATIVE_FULLSCREEN_MODE_ON_LION_LONGTEXT, false)
138     add_obsolete_bool("macosx-stretch") /* since 2.0.0 */
139     add_obsolete_bool("macosx-eq-keep") /* since 2.0.0 */
140     add_obsolete_bool("macosx-autosave-volume") /* since 2.1.0 */
141     add_bool("macosx-video-autoresize", true, KEEPSIZE_TEXT, KEEPSIZE_LONGTEXT, false)
142     add_bool("macosx-pause-minimized", false, PAUSE_MINIMIZED_TEXT, PAUSE_MINIMIZED_LONGTEXT, false)
143     add_bool("macosx-lock-aspect-ratio", true, LOCK_ASPECT_RATIO_TEXT, LOCK_ASPECT_RATIO_TEXT, true)
144     add_bool("macosx-icon-change", true, ICONCHANGE_TEXT, ICONCHANGE_LONGTEXT, true)
145     add_bool("macosx-show-playback-buttons", false, JUMPBUTTONS_TEXT, JUMPBUTTONS_LONGTEXT, false)
146     add_bool("macosx-show-playmode-buttons", true, PLAYMODEBUTTONS_TEXT, PLAYMODEBUTTONS_LONGTEXT, false)
147     add_bool("macosx-show-sidebar", true, SIDEBAR_TEXT, SIDEBAR_LONGTEXT, false)
148
149     add_submodule ()
150         set_description("Mac OS X Video Output Provider")
151         set_capability("vout window nsobject", 100)
152         set_callbacks(WindowOpen, WindowClose)
153
154         add_integer("macosx-vdev", 0, VDEV_TEXT, VDEV_LONGTEXT, false)
155         add_float_with_range("macosx-opaqueness", 1, 0, 1, OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, true);
156         add_bool("macosx-black", true, BLACK_TEXT, BLACK_LONGTEXT, false)
157 vlc_module_end ()
158