av_sub: Support clearing subtitles
[mplayer/glamo.git] / cfg-mplayer.h
blobbe52df881a5274d96ad05a294c262db16b377cd6
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_CFG_MPLAYER_H
20 #define MPLAYER_CFG_MPLAYER_H
23 * config for cfgparser
26 #include <stddef.h>
28 #include "cfg-common.h"
29 #include "libvo/vo_zr.h"
30 #include "options.h"
32 extern char *fb_mode_cfgfile;
33 extern char *fb_mode_name;
35 extern char *lirc_configfile;
37 /* only used at startup (setting these values from configfile) */
38 extern char *vo_geometry;
39 extern int stop_xscreensaver;
41 extern int menu_startup;
42 extern int menu_keepdir;
43 extern char *menu_chroot;
44 extern char *menu_fribidi_charset;
45 extern int menu_flip_hebrew;
46 extern int menu_fribidi_flip_commas;
48 extern char *unrar_executable;
50 extern const m_option_t dxr2_opts[];
52 const m_option_t vd_conf[]={
53 {"help", "Use MPlayer with an appropriate video file instead of live partners to avoid vd.\n", CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
54 {NULL, NULL, 0, 0, 0, 0, NULL}
57 #ifdef CONFIG_TV
58 const m_option_t tvscan_conf[]={
59 {"autostart", &stream_tv_defaults.scan, CONF_TYPE_FLAG, 0, 0, 1, NULL},
60 {"threshold", &stream_tv_defaults.scan_threshold, CONF_TYPE_INT, CONF_RANGE, 1, 100, NULL},
61 {"period", &stream_tv_defaults.scan_period, CONF_TYPE_FLOAT, CONF_RANGE, 0.1, 2.0, NULL},
62 {NULL, NULL, 0, 0, 0, 0, NULL}
64 #endif
66 * CONF_TYPE_FUNC_FULL :
67 * allows own implementations for passing the params
69 * the function receives parameter name and argument (if it does not start with - )
70 * useful with a conf.name like 'aa*' to parse several parameters to a function
71 * return 0 =ok, but we didn't need the param (could be the filename)
72 * return 1 =ok, we accepted the param
73 * negative values: see cfgparser.h, ERR_XXX
75 * by Folke
78 const m_option_t mplayer_opts[]={
79 /* name, pointer, type, flags, min, max */
81 //---------------------- libao/libvo options ------------------------
82 {"o", "Option -o has been renamed to -vo (video-out), use -vo.\n",
83 CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
84 OPT_STRINGLIST("vo", video_driver_list, 0),
85 OPT_STRINGLIST("ao", audio_driver_list, 0),
86 OPT_MAKE_FLAGS("fixed-vo", fixed_vo, CONF_GLOBAL),
87 OPT_MAKE_FLAGS("ontop", vo_ontop, 0),
88 {"rootwin", &vo_rootwin, CONF_TYPE_FLAG, 0, 0, 1, NULL},
89 {"border", &vo_border, CONF_TYPE_FLAG, 0, 0, 1, NULL},
90 {"noborder", &vo_border, CONF_TYPE_FLAG, 0, 1, 0, NULL},
92 {"aop", "-aop has been removed, use -af instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
93 {"dsp", "-dsp has been removed. Use -ao oss:dsp_path instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
94 {"mixer", &mixer_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
95 {"mixer-channel", &mixer_channel, CONF_TYPE_STRING, 0, 0, 0, NULL},
96 {"softvol", &soft_vol, CONF_TYPE_FLAG, 0, 0, 1, NULL},
97 {"nosoftvol", &soft_vol, CONF_TYPE_FLAG, 0, 1, 0, NULL},
98 {"softvol-max", &soft_vol_max, CONF_TYPE_FLOAT, CONF_RANGE, 10, 10000, NULL},
99 {"volstep", &volstep, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
100 {"volume", &start_volume, CONF_TYPE_FLOAT, CONF_RANGE, -1, 10000, NULL},
101 OPT_MAKE_FLAGS("gapless-audio", gapless_audio, 0),
102 {"master", "Option -master has been removed, use -af volume instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
103 // override audio buffer size (used only by -ao oss/win32, obsolete)
104 OPT_INT("abs", ao_buffersize, 0),
106 // -ao pcm options:
107 {"aofile", "-aofile has been removed. Use -ao pcm:file=<filename> instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
108 {"waveheader", "-waveheader has been removed. Use -ao pcm:waveheader instead.\n", CONF_TYPE_PRINT, 0, 0, 1, NULL},
109 {"nowaveheader", "-nowaveheader has been removed. Use -ao pcm:nowaveheader instead.\n", CONF_TYPE_PRINT, 0, 1, 0, NULL},
111 {"alsa", "-alsa has been removed. Remove it from your config file.\n",
112 CONF_TYPE_PRINT, 0, 0, 0, NULL},
113 {"noalsa", "-noalsa has been removed. Remove it from your config file.\n",
114 CONF_TYPE_PRINT, 0, 0, 0, NULL},
115 {"edlout", &edl_output_filename, CONF_TYPE_STRING, 0, 0, 0, NULL},
117 #ifdef CONFIG_X11
118 {"display", &mDisplayName, CONF_TYPE_STRING, 0, 0, 0, NULL},
119 #endif
121 // -vo png only:
122 #ifdef CONFIG_PNG
123 {"z", "-z has been removed. Use -vo png:z=<0-9> instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
124 #endif
125 // -vo jpeg only:
126 #ifdef CONFIG_JPEG
127 {"jpeg", "-jpeg has been removed. Use -vo jpeg:<options> instead.\n",
128 CONF_TYPE_PRINT, 0, 0, 0, NULL},
129 #endif
130 // -vo sdl only:
131 {"sdl", "Use -vo sdl:driver=<driver> instead of -vo sdl -sdl driver.\n",
132 CONF_TYPE_PRINT, 0, 0, 0, NULL},
133 {"noxv", "-noxv has been removed. Use -vo sdl:nohwaccel instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
134 {"forcexv", "-forcexv has been removed. Use -vo sdl:forcexv instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
135 // -ao sdl only:
136 {"sdla", "Use -ao sdl:driver instead of -ao sdl -sdla driver.\n",
137 CONF_TYPE_PRINT, 0, 0, 0, NULL},
139 #if defined(CONFIG_FBDEV) || defined(CONFIG_VESA)
140 {"monitor-hfreq", &monitor_hfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
141 {"monitor-vfreq", &monitor_vfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
142 {"monitor-dotclock", &monitor_dotclock_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
143 #endif
145 #ifdef CONFIG_FBDEV
146 {"fbmode", &fb_mode_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
147 {"fbmodeconfig", &fb_mode_cfgfile, CONF_TYPE_STRING, 0, 0, 0, NULL},
148 #endif
150 // force window width/height or resolution (with -vm)
151 OPT_INTRANGE("x", screen_size_x, 0, 0, 4096),
152 OPT_INTRANGE("y", screen_size_y, 0, 0, 4096),
153 // set screen dimensions (when not detectable or virtual!=visible)
154 OPT_INTRANGE("screenw", vo_screenwidth, CONF_OLD, 0, 4096),
155 OPT_INTRANGE("screenh", vo_screenheight, CONF_OLD, 0, 4096),
156 // Geometry string
157 {"geometry", &vo_geometry, CONF_TYPE_STRING, 0, 0, 0, NULL},
158 OPT_MAKE_FLAGS("force-window-position", force_window_position, 0),
159 // vo name (X classname) and window title strings
160 OPT_STRING("name", vo_winname, 0),
161 OPT_STRING("title", vo_wintitle, 0),
162 // set aspect ratio of monitor - useful for 16:9 TV-out
163 OPT_FLOATRANGE("monitoraspect", force_monitor_aspect, 0, 0.0, 9.0),
164 OPT_FLOATRANGE("monitorpixelaspect", monitor_pixel_aspect, 0, 0.2, 9.0),
165 // video mode switching: (x11,xv,dga)
166 OPT_MAKE_FLAGS("vm", vidmode, 0),
167 // start in fullscreen mode:
168 OPT_MAKE_FLAGS("fs", fullscreen, 0),
169 // set fullscreen switch method (workaround for buggy WMs)
170 {"fsmode", "-fsmode is obsolete, avoid it and use -fstype instead.\nIf you really want it, try -fsmode-dontuse, but don't report bugs!\n", CONF_TYPE_PRINT, CONF_RANGE, 0, 31, NULL},
171 {"fsmode-dontuse", &vo_fsmode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
172 // set bpp (x11+vm, dga, fbdev, vesa, svga?)
173 OPT_INTRANGE("bpp", vo_dbpp, 0, 0, 32),
174 {"colorkey", &vo_colorkey, CONF_TYPE_INT, 0, 0, 0, NULL},
175 {"nocolorkey", &vo_colorkey, CONF_TYPE_FLAG, 0, 0, 0x1000000, NULL},
176 {"double", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 0, 1, NULL},
177 {"nodouble", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 1, 0, NULL},
178 // wait for v-sync (vesa)
179 {"vsync", &vo_vsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
180 {"novsync", &vo_vsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
181 {"panscan", &vo_panscan, CONF_TYPE_FLOAT, CONF_RANGE, -1.0, 1.0, NULL},
182 OPT_FLOATRANGE("panscanrange", vo_panscanrange, 0, -19.0, 99.0),
184 {"grabpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
185 {"nograbpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 1, 0, NULL},
187 {"adapter", &vo_adapter_num, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL},
188 {"refreshrate",&vo_refresh_rate,CONF_TYPE_INT,CONF_RANGE, 0,100, NULL},
189 {"wid", &WinID, CONF_TYPE_INT64, 0, 0, 0, NULL},
190 #ifdef CONFIG_X11
191 // x11,xv,xmga,xvidix
192 {"icelayer", "-icelayer has been removed. Use -fstype layer:<number> instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
193 {"stop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 0, 1, NULL},
194 {"nostop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 1, 0, NULL},
195 {"stop_xscreensaver", "Use -stop-xscreensaver instead, options with _ have been obsoleted.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
196 {"fstype", &vo_fstype_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
197 #endif
198 {"heartbeat-cmd", &heartbeat_cmd, CONF_TYPE_STRING, 0, 0, 0, NULL},
199 {"mouseinput", &vo_nomouse_input, CONF_TYPE_FLAG, 0, 1, 0, NULL},
200 {"nomouseinput", &vo_nomouse_input, CONF_TYPE_FLAG,0, 0, 1, NULL},
202 {"xineramascreen", &xinerama_screen, CONF_TYPE_INT, CONF_RANGE, -2, 32, NULL},
204 OPT_INTRANGE("brightness", vo_gamma_brightness, 0, -100, 100),
205 OPT_INTRANGE("saturation", vo_gamma_saturation, 0, -100, 100),
206 OPT_INTRANGE("contrast", vo_gamma_contrast, 0, -100, 100),
207 OPT_INTRANGE("hue", vo_gamma_hue, 0, -100, 100),
208 {"keepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
209 {"nokeepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 1, 0, NULL},
211 // direct rendering (decoding to video out buffer)
212 {"dr", &vo_directrendering, CONF_TYPE_FLAG, 0, 0, 1, NULL},
213 {"nodr", &vo_directrendering, CONF_TYPE_FLAG, 0, 1, 0, NULL},
214 {"vaa_dr", "-vaa_dr has been removed, use -dr.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
215 {"vaa_nodr", "-vaa_nodr has been removed, use -nodr.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
217 #ifdef CONFIG_AA
218 // -vo aa
219 {"aa*", "-aa* has been removed. Use -vo aa:suboption instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
220 #endif
222 #ifdef CONFIG_ZR
223 // -vo zr
224 {"zr*", vo_zr_parseoption, CONF_TYPE_FUNC_FULL, 0, 0, 0, &vo_zr_revertoption },
225 #endif
227 #ifdef CONFIG_DXR2
228 {"dxr2", &dxr2_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
229 #endif
232 //---------------------- mplayer-only options ------------------------
234 {"use-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
235 {"nouse-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
236 {"use-filename-title", &use_filename_title, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
237 {"nouse-filename-title", &use_filename_title, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
238 #ifdef CONFIG_CRASH_DEBUG
239 {"crash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
240 {"nocrash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
241 #endif
242 OPT_INTRANGE("osdlevel", osd_level, 0, 0, 3),
243 OPT_INTRANGE("osd-duration", osd_duration, 0, 0, 3600000),
244 #ifdef CONFIG_MENU
245 {"menu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
246 {"nomenu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
247 {"menu-root", &menu_root, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
248 {"menu-cfg", &menu_cfg, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
249 {"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
250 {"menu-keepdir", &menu_keepdir, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
251 {"menu-chroot", &menu_chroot, CONF_TYPE_STRING, 0, 0, 0, NULL},
252 #ifdef CONFIG_FRIBIDI
253 {"menu-fribidi-charset", &menu_fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
254 {"menu-flip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
255 {"menu-noflip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
256 {"menu-flip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
257 {"menu-noflip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
258 #endif /* CONFIG_FRIBIDI */
259 #else
260 {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL},
261 #endif /* CONFIG_MENU */
263 // these should be moved to -common, and supported in MEncoder
264 {"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
265 {"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
266 #ifdef CONFIG_UNRAR_EXEC
267 {"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL},
268 #endif
270 {"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
272 {"framedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 1, NULL},
273 {"hardframedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 2, NULL},
274 {"noframedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 1, 0, NULL},
276 OPT_INTRANGE("autoq", auto_quality, 0, 0, 100),
278 OPT_FLAG_ON("benchmark", benchmark, 0),
280 // dump some stream out instead of playing the file
281 // this really should be in MEncoder instead of MPlayer... -> TODO
282 OPT_STRING("dumpfile", stream_dump_name, 0),
283 {"dumpaudio", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 1, NULL},
284 {"dumpvideo", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 2, NULL},
285 {"dumpsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 3, NULL},
286 {"dumpmpsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 4, NULL},
287 {"dumpstream", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 5, NULL},
288 {"dumpsrtsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 6, NULL},
289 {"dumpmicrodvdsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 7, NULL},
290 {"dumpjacosub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 8, NULL},
291 {"dumpsami", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 9, NULL},
293 OPT_MAKE_FLAGS("capture", capture_dump, 0),
295 #ifdef CONFIG_LIRC
296 {"lircconf", &lirc_configfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
297 #endif
299 // these should be removed when gmplayer is forgotten
300 {"gui", "Internal GUI was removed. Use some other frontend instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
301 {"nogui", "Internal GUI was removed, -nogui is no longer valid.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
303 OPT_FLAG_CONSTANTS("noloop", loop_times, 0, 0, -1),
304 OPT_INTRANGE("loop", loop_times, 0, -1, 10000),
305 {"playlist", NULL, CONF_TYPE_STRING, 0, 0, 0, NULL},
307 OPT_MAKE_FLAGS("ordered-chapters", ordered_chapters, 0),
308 OPT_INTRANGE("chapter-merge-threshold", chapter_merge_threshold, 0, 0, 10000),
310 // a-v sync stuff:
311 OPT_MAKE_FLAGS("correct-pts", user_correct_pts, 0),
312 OPT_INTRANGE("pts-association-mode", user_pts_assoc_mode, 0, 0, 2),
313 OPT_MAKE_FLAGS("initial-audio-sync", initial_audio_sync, 0),
314 OPT_FLAG_CONSTANTS("noautosync", autosync, 0, 0, -1),
315 OPT_INTRANGE("autosync", autosync, 0, 0, 10000),
317 OPT_FLAG_ON("softsleep", softsleep, 0),
318 #ifdef HAVE_RTC
319 OPT_MAKE_FLAGS("rtc", rtc, 0),
320 OPT_STRING("rtc-device", rtc_device, 0),
321 #endif
323 OPT_MAKE_FLAGS("term-osd", term_osd, 0),
324 OPT_STRING("term-osd-esc", term_osd_esc, 0),
325 OPT_STRING("playing-msg", playing_msg, 0),
327 {"slave", &slave_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},
328 OPT_MAKE_FLAGS("idle", player_idle_mode, CONF_GLOBAL),
329 {"use-stdin", "-use-stdin has been renamed to -noconsolecontrols, use that instead.", CONF_TYPE_PRINT, 0, 0, 0, NULL},
330 OPT_INTRANGE("key-fifo-size", key_fifo_size, CONF_GLOBAL, 2, 65000),
331 OPT_MAKE_FLAGS("consolecontrols", consolecontrols, CONF_GLOBAL),
332 {"mouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
333 {"nomouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
334 OPT_INTRANGE("doubleclick-time", doubleclick_time, 0, 0, 1000),
335 #ifdef CONFIG_TV
336 {"tvscan", (void *) tvscan_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
337 #else
338 {"tvscan", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
339 #endif /* CONFIG_TV */
341 OPT_FLAG_ON("list-properties", list_properties, CONF_GLOBAL),
342 {"identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_FLAG, CONF_GLOBAL, 0, MSGL_V, NULL},
343 {"-help", (void *) help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
344 {"help", (void *) help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
345 {"h", (void *) help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
347 {"vd", (void *) vd_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
348 {NULL, NULL, 0, 0, 0, 0, NULL}
351 #endif /* MPLAYER_CFG_MPLAYER_H */