vo_gl: fix crash with ati-hack after 20256a8a64c9679bc9136bb
[mplayer.git] / cfg-mplayer.h
blob12d4b582c47a47dd3fada187b8e06b8e9e376e2a
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>
27 #include <sys/types.h>
29 #include "options.h"
30 #include "config.h"
31 #include "m_config.h"
32 #include "m_option.h"
33 #include "libmpdemux/demux_ts.h"
34 #include "stream/tv.h"
35 #include "stream/stream_radio.h"
36 #include "libvo/csputils.h"
38 extern char *fb_mode_cfgfile;
39 extern char *fb_mode_name;
41 extern char *lirc_configfile;
43 /* only used at startup (setting these values from configfile) */
44 extern char *vo_geometry;
45 extern int stop_xscreensaver;
47 extern int menu_startup;
48 extern int menu_keepdir;
49 extern char *menu_chroot;
50 extern char *menu_fribidi_charset;
51 extern int menu_flip_hebrew;
52 extern int menu_fribidi_flip_commas;
54 extern char *unrar_executable;
56 extern char *mp_msg_charset;
57 extern int mp_msg_color;
58 extern int mp_msg_module;
60 /* defined in codec-cfg.c */
61 extern char *codecs_file;
63 /* defined in dec_video.c */
64 extern int field_dominance;
66 /* from dec_audio, currently used for ac3surround decoder only */
67 extern int fakemono;
69 /* defined in network.c */
70 extern char *network_username;
71 extern char *network_password;
72 extern int network_bandwidth;
73 extern char *network_useragent;
74 extern char *network_referrer;
75 extern int network_cookies_enabled;
76 extern char *cookies_file;
78 extern int network_prefer_ipv4;
79 extern int network_ipv4_only_proxy;
80 extern int reuse_socket;
82 extern int dvd_speed; /* stream/stream_dvd.c */
84 /* defined in libmpdemux: */
85 extern const m_option_t demux_rawaudio_opts[];
86 extern const m_option_t demux_rawvideo_opts[];
87 extern const m_option_t cdda_opts[];
89 extern int ts_prog;
90 extern int ts_keep_broken;
91 extern off_t ts_probe;
92 extern int audio_substream_id;
93 extern off_t ps_probe;
95 extern int sws_flags;
96 extern char* pp_help;
98 #ifdef CONFIG_RADIO
99 const m_option_t radioopts_conf[]={
100 {"device", &stream_radio_defaults.device, CONF_TYPE_STRING, 0, 0 ,0, NULL},
101 {"driver", &stream_radio_defaults.driver, CONF_TYPE_STRING, 0, 0 ,0, NULL},
102 #ifdef RADIO_BSDBT848_HDR
103 {"freq_min", &stream_radio_defaults.freq_min, CONF_TYPE_FLOAT, 0, 0 ,0, NULL},
104 {"freq_max", &stream_radio_defaults.freq_max, CONF_TYPE_FLOAT, 0, 0 ,0, NULL},
105 #endif
106 {"channels", &stream_radio_defaults.channels, CONF_TYPE_STRING_LIST, 0, 0 ,0, NULL},
107 {"volume", &stream_radio_defaults.volume, CONF_TYPE_INT, CONF_RANGE, 0 ,100, NULL},
108 {"adevice", &stream_radio_defaults.adevice, CONF_TYPE_STRING, 0, 0 ,0, NULL},
109 {"arate", &stream_radio_defaults.arate, CONF_TYPE_INT, CONF_MIN, 0 ,0, NULL},
110 {"achannels", &stream_radio_defaults.achannels, CONF_TYPE_INT, CONF_MIN, 0 ,0, NULL},
111 {NULL, NULL, 0, 0, 0, 0, NULL}
113 #endif /* CONFIG_RADIO */
115 #ifdef CONFIG_TV
116 const m_option_t tvopts_conf[]={
117 {"immediatemode", &stream_tv_defaults.immediate, CONF_TYPE_INT, CONF_RANGE, 0, 1, NULL},
118 {"noaudio", &stream_tv_defaults.noaudio, CONF_TYPE_FLAG, 0, 0, 1, NULL},
119 {"audiorate", &stream_tv_defaults.audiorate, CONF_TYPE_INT, 0, 0, 0, NULL},
120 {"driver", &stream_tv_defaults.driver, CONF_TYPE_STRING, 0, 0, 0, NULL},
121 {"device", &stream_tv_defaults.device, CONF_TYPE_STRING, 0, 0, 0, NULL},
122 {"freq", &stream_tv_defaults.freq, CONF_TYPE_STRING, 0, 0, 0, NULL},
123 {"channel", &stream_tv_defaults.channel, CONF_TYPE_STRING, 0, 0, 0, NULL},
124 {"chanlist", &stream_tv_defaults.chanlist, CONF_TYPE_STRING, 0, 0, 0, NULL},
125 {"norm", &stream_tv_defaults.norm, CONF_TYPE_STRING, 0, 0, 0, NULL},
126 {"automute", &stream_tv_defaults.automute, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
127 #if defined(CONFIG_TV_V4L2) || defined(CONFIG_TV_DSHOW)
128 {"normid", &stream_tv_defaults.normid, CONF_TYPE_INT, 0, 0, 0, NULL},
129 #endif
130 {"width", &stream_tv_defaults.width, CONF_TYPE_INT, 0, 0, 4096, NULL},
131 {"height", &stream_tv_defaults.height, CONF_TYPE_INT, 0, 0, 4096, NULL},
132 {"input", &stream_tv_defaults.input, CONF_TYPE_INT, 0, 0, 20, NULL},
133 {"outfmt", &stream_tv_defaults.outfmt, CONF_TYPE_IMGFMT, 0, 0, 0, NULL},
134 {"fps", &stream_tv_defaults.fps, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
135 {"channels", &stream_tv_defaults.channels, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
136 {"brightness", &stream_tv_defaults.brightness, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
137 {"contrast", &stream_tv_defaults.contrast, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
138 {"hue", &stream_tv_defaults.hue, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
139 {"saturation", &stream_tv_defaults.saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
140 {"gain", &stream_tv_defaults.gain, CONF_TYPE_INT, CONF_RANGE, -1, 100, NULL},
141 #if defined(CONFIG_TV_V4L) || defined(CONFIG_TV_V4L2) || defined(CONFIG_TV_DSHOW)
142 {"buffersize", &stream_tv_defaults.buffer_size, CONF_TYPE_INT, CONF_RANGE, 16, 1024, NULL},
143 {"amode", &stream_tv_defaults.amode, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
144 {"volume", &stream_tv_defaults.volume, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
145 #endif
146 #if defined(CONFIG_TV_V4L) || defined(CONFIG_TV_V4L2)
147 {"bass", &stream_tv_defaults.bass, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
148 {"treble", &stream_tv_defaults.treble, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
149 {"balance", &stream_tv_defaults.balance, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
150 {"forcechan", &stream_tv_defaults.forcechan, CONF_TYPE_INT, CONF_RANGE, 1, 2, NULL},
151 {"forceaudio", &stream_tv_defaults.force_audio, CONF_TYPE_FLAG, 0, 0, 1, NULL},
152 {"buffersize", &stream_tv_defaults.buffer_size, CONF_TYPE_INT, CONF_RANGE, 16, 1024, NULL},
153 {"mjpeg", &stream_tv_defaults.mjpeg, CONF_TYPE_FLAG, 0, 0, 1, NULL},
154 {"decimation", &stream_tv_defaults.decimation, CONF_TYPE_INT, CONF_RANGE, 1, 4, NULL},
155 {"quality", &stream_tv_defaults.quality, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
156 #ifdef CONFIG_ALSA
157 {"alsa", &stream_tv_defaults.alsa, CONF_TYPE_FLAG, 0, 0, 1, NULL},
158 #endif /* CONFIG_ALSA */
159 #endif /* defined(CONFIG_TV_V4L) || defined(CONFIG_TV_V4L2) */
160 {"adevice", &stream_tv_defaults.adevice, CONF_TYPE_STRING, 0, 0, 0, NULL},
161 {"tdevice", &stream_tv_defaults.teletext.device, CONF_TYPE_STRING, 0, 0, 0, NULL},
162 {"tpage", &stream_tv_defaults.teletext.page, CONF_TYPE_INT, CONF_RANGE, 100, 899, NULL},
163 {"tformat", &stream_tv_defaults.teletext.format, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
164 {"tlang", &stream_tv_defaults.teletext.lang, CONF_TYPE_INT, CONF_RANGE, -1, 0x7f, NULL},
165 {"audioid", &stream_tv_defaults.audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
166 #ifdef CONFIG_TV_DSHOW
167 {"hidden_video_renderer", &stream_tv_defaults.hidden_video_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
168 {"nohidden_video_renderer", &stream_tv_defaults.hidden_video_renderer, CONF_TYPE_FLAG, 0, 0, 0, NULL},
169 {"hidden_vp_renderer", &stream_tv_defaults.hidden_vp_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
170 {"nohidden_vp_renderer", &stream_tv_defaults.hidden_vp_renderer, CONF_TYPE_FLAG, 0, 0, 0, NULL},
171 {"system_clock", &stream_tv_defaults.system_clock, CONF_TYPE_FLAG, 0, 0, 1, NULL},
172 {"nosystem_clock", &stream_tv_defaults.system_clock, CONF_TYPE_FLAG, 0, 0, 0, NULL},
173 {"normalize_audio_chunks", &stream_tv_defaults.normalize_audio_chunks, CONF_TYPE_FLAG, 0, 0, 1, NULL},
174 {"nonormalize_audio_chunks", &stream_tv_defaults.normalize_audio_chunks, CONF_TYPE_FLAG, 0, 0, 0, NULL},
175 #endif
176 {NULL, NULL, 0, 0, 0, 0, NULL}
178 #endif /* CONFIG_TV */
180 extern int pvr_param_aspect_ratio;
181 extern int pvr_param_sample_rate;
182 extern int pvr_param_audio_layer;
183 extern int pvr_param_audio_bitrate;
184 extern char *pvr_param_audio_mode;
185 extern int pvr_param_bitrate;
186 extern char *pvr_param_bitrate_mode;
187 extern int pvr_param_bitrate_peak;
188 extern char *pvr_param_stream_type;
190 #ifdef CONFIG_PVR
191 const m_option_t pvropts_conf[]={
192 {"aspect", &pvr_param_aspect_ratio, CONF_TYPE_INT, 0, 1, 4, NULL},
193 {"arate", &pvr_param_sample_rate, CONF_TYPE_INT, 0, 32000, 48000, NULL},
194 {"alayer", &pvr_param_audio_layer, CONF_TYPE_INT, 0, 1, 2, NULL},
195 {"abitrate", &pvr_param_audio_bitrate, CONF_TYPE_INT, 0, 32, 448, NULL},
196 {"amode", &pvr_param_audio_mode, CONF_TYPE_STRING, 0, 0, 0, NULL},
197 {"vbitrate", &pvr_param_bitrate, CONF_TYPE_INT, 0, 0, 0, NULL},
198 {"vmode", &pvr_param_bitrate_mode, CONF_TYPE_STRING, 0, 0, 0, NULL},
199 {"vpeak", &pvr_param_bitrate_peak, CONF_TYPE_INT, 0, 0, 0, NULL},
200 {"fmt", &pvr_param_stream_type, CONF_TYPE_STRING, 0, 0, 0, NULL},
201 {NULL, NULL, 0, 0, 0, 0, NULL}
203 #endif /* CONFIG_PVR */
205 extern const m_option_t dvbin_opts_conf[];
206 extern const m_option_t lavfdopts_conf[];
208 extern int rtsp_transport_tcp;
209 extern int rtsp_transport_http;
210 extern int rtsp_transport_sctp;
211 extern int rtsp_port;
212 extern char *rtsp_destination;
215 extern int sws_chr_vshift;
216 extern int sws_chr_hshift;
217 extern float sws_chr_gblur;
218 extern float sws_lum_gblur;
219 extern float sws_chr_sharpen;
220 extern float sws_lum_sharpen;
222 const m_option_t scaler_filter_conf[]={
223 {"lgb", &sws_lum_gblur, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
224 {"cgb", &sws_chr_gblur, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
225 {"cvs", &sws_chr_vshift, CONF_TYPE_INT, 0, 0, 0, NULL},
226 {"chs", &sws_chr_hshift, CONF_TYPE_INT, 0, 0, 0, NULL},
227 {"ls", &sws_lum_sharpen, CONF_TYPE_FLOAT, 0, -100.0, 100.0, NULL},
228 {"cs", &sws_chr_sharpen, CONF_TYPE_FLOAT, 0, -100.0, 100.0, NULL},
229 {NULL, NULL, 0, 0, 0, 0, NULL}
232 /* VIVO demuxer options: */
233 extern int vivo_param_version;
234 extern char *vivo_param_acodec;
235 extern int vivo_param_abitrate;
236 extern int vivo_param_samplerate;
237 extern int vivo_param_bytesperblock;
238 extern int vivo_param_width;
239 extern int vivo_param_height;
240 extern int vivo_param_vformat;
241 extern char *dvd_device, *cdrom_device;
243 const m_option_t vivoopts_conf[]={
244 {"version", &vivo_param_version, CONF_TYPE_INT, 0, 0, 0, NULL},
245 /* audio options */
246 {"acodec", &vivo_param_acodec, CONF_TYPE_STRING, 0, 0, 0, NULL},
247 {"abitrate", &vivo_param_abitrate, CONF_TYPE_INT, 0, 0, 0, NULL},
248 {"samplerate", &vivo_param_samplerate, CONF_TYPE_INT, 0, 0, 0, NULL},
249 {"bytesperblock", &vivo_param_bytesperblock, CONF_TYPE_INT, 0, 0, 0, NULL},
250 /* video options */
251 {"width", &vivo_param_width, CONF_TYPE_INT, 0, 0, 0, NULL},
252 {"height", &vivo_param_height, CONF_TYPE_INT, 0, 0, 0, NULL},
253 {"vformat", &vivo_param_vformat, CONF_TYPE_INT, 0, 0, 0, NULL},
254 {NULL, NULL, 0, 0, 0, 0, NULL}
257 extern int mf_w;
258 extern int mf_h;
259 extern double mf_fps;
260 extern char * mf_type;
261 extern m_obj_list_t vf_obj_list;
263 const m_option_t mfopts_conf[]={
264 {"w", &mf_w, CONF_TYPE_INT, 0, 0, 0, NULL},
265 {"h", &mf_h, CONF_TYPE_INT, 0, 0, 0, NULL},
266 {"fps", &mf_fps, CONF_TYPE_DOUBLE, 0, 0, 0, NULL},
267 {"type", &mf_type, CONF_TYPE_STRING, 0, 0, 0, NULL},
268 {NULL, NULL, 0, 0, 0, 0, NULL}
271 #include "libaf/af.h"
272 extern af_cfg_t af_cfg; // Audio filter configuration, defined in libmpcodecs/dec_audio.c
273 const m_option_t audio_filter_conf[]={
274 {"list", &af_cfg.list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
275 {"force", &af_cfg.force, CONF_TYPE_INT, CONF_RANGE, 0, 7, NULL},
276 {NULL, NULL, 0, 0, 0, 0, NULL}
279 extern int mp_msg_levels[MSGT_MAX];
280 extern int mp_msg_level_all;
282 const m_option_t msgl_config[]={
283 { "all", &mp_msg_level_all, CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL},
285 { "global", &mp_msg_levels[MSGT_GLOBAL], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
286 { "cplayer", &mp_msg_levels[MSGT_CPLAYER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
287 { "vo", &mp_msg_levels[MSGT_VO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
288 { "ao", &mp_msg_levels[MSGT_AO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
289 { "demuxer", &mp_msg_levels[MSGT_DEMUXER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
290 { "ds", &mp_msg_levels[MSGT_DS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
291 { "demux", &mp_msg_levels[MSGT_DEMUX], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
292 { "header", &mp_msg_levels[MSGT_HEADER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
293 { "avsync", &mp_msg_levels[MSGT_AVSYNC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
294 { "autoq", &mp_msg_levels[MSGT_AUTOQ], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
295 { "cfgparser", &mp_msg_levels[MSGT_CFGPARSER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
296 { "decaudio", &mp_msg_levels[MSGT_DECAUDIO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
297 { "decvideo", &mp_msg_levels[MSGT_DECVIDEO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
298 { "seek", &mp_msg_levels[MSGT_SEEK], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
299 { "win32", &mp_msg_levels[MSGT_WIN32], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
300 { "open", &mp_msg_levels[MSGT_OPEN], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
301 { "dvd", &mp_msg_levels[MSGT_DVD], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
302 { "parsees", &mp_msg_levels[MSGT_PARSEES], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
303 { "lirc", &mp_msg_levels[MSGT_LIRC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
304 { "stream", &mp_msg_levels[MSGT_STREAM], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
305 { "cache", &mp_msg_levels[MSGT_CACHE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
306 { "xacodec", &mp_msg_levels[MSGT_XACODEC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
307 { "tv", &mp_msg_levels[MSGT_TV], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
308 { "radio", &mp_msg_levels[MSGT_RADIO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
309 { "osdep", &mp_msg_levels[MSGT_OSDEP], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
310 { "spudec", &mp_msg_levels[MSGT_SPUDEC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
311 { "playtree", &mp_msg_levels[MSGT_PLAYTREE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
312 { "input", &mp_msg_levels[MSGT_INPUT], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
313 { "vfilter", &mp_msg_levels[MSGT_VFILTER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
314 { "osd", &mp_msg_levels[MSGT_OSD], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
315 { "network", &mp_msg_levels[MSGT_NETWORK], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
316 { "cpudetect", &mp_msg_levels[MSGT_CPUDETECT], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
317 { "codeccfg", &mp_msg_levels[MSGT_CODECCFG], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
318 { "sws", &mp_msg_levels[MSGT_SWS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
319 { "vobsub", &mp_msg_levels[MSGT_VOBSUB], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
320 { "subreader", &mp_msg_levels[MSGT_SUBREADER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
321 { "afilter", &mp_msg_levels[MSGT_AFILTER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
322 { "netst", &mp_msg_levels[MSGT_NETST], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
323 { "muxer", &mp_msg_levels[MSGT_MUXER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
324 { "osd-menu", &mp_msg_levels[MSGT_OSD_MENU], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
325 { "identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
326 { "ass", &mp_msg_levels[MSGT_ASS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
327 { "statusline", &mp_msg_levels[MSGT_STATUSLINE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
328 { "fixme", &mp_msg_levels[MSGT_FIXME], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
329 {"help", "Available msg modules:\n"
330 " global - common player errors/information\n"
331 " cplayer - console player (mplayer.c)\n"
332 " vo - libvo\n"
333 " ao - libao\n"
334 " demuxer - demuxer.c (general stuff)\n"
335 " ds - demux stream (add/read packet etc)\n"
336 " demux - fileformat-specific stuff (demux_*.c)\n"
337 " header - fileformat-specific header (*header.c)\n"
338 " avsync - mplayer.c timer stuff\n"
339 " autoq - mplayer.c auto-quality stuff\n"
340 " cfgparser - cfgparser.c\n"
341 " decaudio - av decoder\n"
342 " decvideo\n"
343 " seek - seeking code\n"
344 " win32 - win32 dll stuff\n"
345 " open - open.c (stream opening)\n"
346 " dvd - open.c (DVD init/read/seek)\n"
347 " parsees - parse_es.c (mpeg stream parser)\n"
348 " lirc - lirc_mp.c and input lirc driver\n"
349 " stream - stream.c\n"
350 " cache - cache2.c\n"
351 " xacodec - XAnim codecs\n"
352 " tv - TV input subsystem\n"
353 " osdep - OS-dependent parts\n"
354 " spudec - spudec.c\n"
355 " playtree - Playtree handling (playtree.c, playtreeparser.c)\n"
356 " input\n"
357 " vfilter\n"
358 " osd\n"
359 " network\n"
360 " cpudetect\n"
361 " codeccfg\n"
362 " sws\n"
363 " vobsub\n"
364 " subreader\n"
365 " osd-menu - OSD menu messages\n"
366 " afilter - Audio filter messages\n"
367 " netst - Netstream\n"
368 " muxer - muxer layer\n"
369 " identify - identify output\n"
370 " ass - libass messages\n"
371 " statusline - playback/encoding status line\n"
372 " fixme - messages not yet fixed to map to module\n"
373 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
374 {NULL, NULL, 0, 0, 0, 0, NULL}
378 extern const m_option_t lavc_decode_opts_conf[];
379 extern const m_option_t xvid_dec_opts[];
381 const m_option_t common_opts[] = {
382 // ------------------------- common options --------------------
383 OPT_MAKE_FLAGS("quiet", quiet, CONF_GLOBAL),
384 {"really-quiet", &verbose, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_PRE_PARSE, 0, -10, NULL},
385 {"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, NULL},
386 {"msglevel", (void *) msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
387 {"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
388 {"nomsgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
389 {"msgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
390 {"nomsgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
391 #ifdef CONFIG_ICONV
392 {"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
393 #endif
394 #ifdef CONFIG_PRIORITY
395 {"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL},
396 #endif
397 {"codecpath", &codec_path, CONF_TYPE_STRING, 0, 0, 0, NULL},
398 OPT_CHOICE("noconfig", noconfig, CONF_GLOBAL | CONF_NOCFG | CONF_PRE_PARSE,
399 ({"off", 0}, {"user", 1}, {"system", 2}, {"all", 3})),
401 // ------------------------- stream options --------------------
403 #ifdef CONFIG_STREAM_CACHE
404 {"cache", &stream_cache_size, CONF_TYPE_INT, CONF_RANGE, 32, 1048576, NULL},
405 {"nocache", &stream_cache_size, CONF_TYPE_FLAG, 0, 1, 0, NULL},
406 OPT_FLOATRANGE("cache-min", stream_cache_min_percent, 0, 0, 99),
407 OPT_FLOATRANGE("cache-seek-min", stream_cache_seek_min_percent, 0, 0, 99),
408 #else
409 {"cache", "MPlayer was compiled without cache2 support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
410 #endif /* CONFIG_STREAM_CACHE */
411 {"cdrom-device", &cdrom_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
412 #ifdef CONFIG_DVDREAD
413 {"dvd-device", &dvd_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
414 {"dvd-speed", &dvd_speed, CONF_TYPE_INT, 0, 0, 0, NULL},
415 {"dvdangle", &dvd_angle, CONF_TYPE_INT, CONF_RANGE, 1, 99, NULL},
416 #else
417 {"dvd-device", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
418 {"dvd-speed", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
419 {"dvd", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
420 #endif /* CONFIG_DVDREAD */
421 OPT_INTPAIR("chapter", chapterrange, 0),
422 OPT_INTRANGE("edition", edition_id, 0, -1, 8190),
423 #ifdef CONFIG_LIBBLURAY
424 {"bluray-device", &bluray_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
425 {"bluray-angle", &bluray_angle, CONF_TYPE_INT, CONF_RANGE, 0, 999, NULL},
426 {"bluray-chapter", &bluray_chapter, CONF_TYPE_INT, CONF_RANGE, 0, 999, NULL},
427 #else
428 {"bluray-device", "MPlayer was compiled without libbluray support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
429 {"bluray-angle", "MPlayer was compiled without libbluray support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
430 {"bluray-chapter", "MPlayer was compiled without libbluray support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
431 #endif /* CONFIG_LIBBLURAY */
433 {"dvdauth", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
434 {"dvdkey", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
435 {"csslib", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
437 #ifdef CONFIG_NETWORKING
438 {"user", &network_username, CONF_TYPE_STRING, 0, 0, 0, NULL},
439 {"passwd", &network_password, CONF_TYPE_STRING, 0, 0, 0, NULL},
440 {"bandwidth", &network_bandwidth, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
441 {"http-header-fields", &network_http_header_fields, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
442 {"user-agent", &network_useragent, CONF_TYPE_STRING, 0, 0, 0, NULL},
443 {"referrer", &network_referrer, CONF_TYPE_STRING, 0, 0, 0, NULL},
444 {"cookies", &network_cookies_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL},
445 {"nocookies", &network_cookies_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL},
446 {"cookies-file", &cookies_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
447 {"prefer-ipv4", &network_prefer_ipv4, CONF_TYPE_FLAG, 0, 0, 1, NULL},
448 {"ipv4-only-proxy", &network_ipv4_only_proxy, CONF_TYPE_FLAG, 0, 0, 1, NULL},
449 {"reuse-socket", &reuse_socket, CONF_TYPE_FLAG, 0, 0, 1, NULL},
450 {"noreuse-socket", &reuse_socket, CONF_TYPE_FLAG, 0, 1, 0, NULL},
451 #ifdef HAVE_AF_INET6
452 {"prefer-ipv6", &network_prefer_ipv4, CONF_TYPE_FLAG, 0, 1, 0, NULL},
453 #else
454 {"prefer-ipv6", "MPlayer was compiled without IPv6 support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
455 #endif /* HAVE_AF_INET6 */
457 #else
458 {"user", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
459 {"passwd", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
460 {"bandwidth", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
461 {"user-agent", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
462 #endif /* CONFIG_NETWORKING */
464 #ifdef CONFIG_LIVE555
465 {"rtsp-stream-over-http", &rtsp_transport_http, CONF_TYPE_FLAG, 0, 0, 1, NULL},
466 #else
467 {"rtsp-stream-over-http", "-rtsp-stream-over-http requires the \"LIVE555 Streaming Media\" library.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
468 #endif /* CONFIG_LIVE555 */
469 #if defined(CONFIG_LIBNEMESI) || defined(CONFIG_LIVE555)
470 // -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP
471 {"rtsp-stream-over-tcp", &rtsp_transport_tcp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
472 #else
473 {"rtsp-stream-over-tcp", "-rtsp-stream-over-tcp requires the \"LIVE555 Streaming Media\" or \"libnemesi\" libraries.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
474 #endif /* defined(CONFIG_LIBNEMESI) || defined(CONFIG_LIVE555) */
475 #ifdef CONFIG_LIBNEMESI
476 {"rtsp-stream-over-sctp", &rtsp_transport_sctp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
477 #else
478 {"rtsp-stream-over-sctp", "-rtsp-stream-over-sctp requires the \"libnemesi\" library\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
479 #endif /* CONFIG_LIBNEMESI */
480 #ifdef CONFIG_NETWORKING
481 {"rtsp-port", &rtsp_port, CONF_TYPE_INT, CONF_RANGE, -1, 65535, NULL},
482 {"rtsp-destination", &rtsp_destination, CONF_TYPE_STRING, CONF_MIN, 0, 0, NULL},
483 #else
484 {"rtsp-port", "MPlayer was compiled without networking support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
485 {"rtsp-destination", "MPlayer was compiled without networking support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
486 #endif /* CONFIG_NETWORKING */
488 // ------------------------- demuxer options --------------------
490 // number of frames to play/convert
491 {"frames", &play_n_frames_mf, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
493 // seek to byte/seconds position
494 {"sb", &seek_to_byte, CONF_TYPE_POSITION, CONF_MIN, 0, 0, NULL},
495 OPT_TIME("ss", seek_to_sec, 0),
497 // stop at given position
498 {"endpos", &end_at, CONF_TYPE_TIME_SIZE, 0, 0, 0, NULL},
500 {"edl", &edl_filename, CONF_TYPE_STRING, 0, 0, 0, NULL},
502 // AVI specific: force non-interleaved mode
503 {"ni", &force_ni, CONF_TYPE_FLAG, 0, 0, 1, NULL},
504 {"noni", &force_ni, CONF_TYPE_FLAG, 0, 1, 0, NULL},
506 // AVI and Ogg only: (re)build index at startup
507 {"noidx", &index_mode, CONF_TYPE_FLAG, 0, -1, 0, NULL},
508 {"idx", &index_mode, CONF_TYPE_FLAG, 0, -1, 1, NULL},
509 {"forceidx", &index_mode, CONF_TYPE_FLAG, 0, -1, 2, NULL},
510 {"saveidx", &index_file_save, CONF_TYPE_STRING, 0, 0, 0, NULL},
511 {"loadidx", &index_file_load, CONF_TYPE_STRING, 0, 0, 0, NULL},
513 // select audio/video/subtitle stream
514 OPT_INTRANGE("aid", audio_id, 0, -2, 8190),
515 {"ausid", &audio_substream_id, CONF_TYPE_INT, 0, 0, 0, NULL},
516 OPT_INTRANGE("vid", video_id, 0, -2, 8190),
517 OPT_INTRANGE("sid", sub_id, 0, -2, 8190),
518 OPT_FLAG_CONSTANTS("nosub", sub_id, 0, -1, -2),
519 OPT_FLAG_CONSTANTS("novideo", video_id, 0, -1, -2),
520 OPT_FLAG_CONSTANTS("sound", audio_id, 0, -2, -1),
521 OPT_FLAG_CONSTANTS("nosound", audio_id, 0, -1, -2),
522 OPT_STRINGLIST("alang", audio_lang, 0),
523 OPT_STRINGLIST("slang", sub_lang, 0),
525 OPT_MAKE_FLAGS("hr-mp3-seek", hr_mp3_seek, 0),
527 { "rawaudio", (void *)&demux_rawaudio_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
528 { "rawvideo", (void *)&demux_rawvideo_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
530 #ifdef CONFIG_CDDA
531 { "cdda", (void *)&cdda_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
532 #endif
534 // demuxer.c - select audio/sub file/demuxer
535 OPT_STRING("audiofile", audio_stream, 0),
536 OPT_INTRANGE("audiofile-cache", audio_stream_cache, 0, 50, 65536),
537 OPT_STRING("subfile", sub_stream, 0),
538 OPT_STRING("demuxer", demuxer_name, 0),
539 OPT_STRING("audio-demuxer", audio_demuxer_name, 0),
540 OPT_STRING("sub-demuxer", sub_demuxer_name, 0),
541 OPT_MAKE_FLAGS("extbased", extension_parsing, 0),
543 {"mf", (void *) mfopts_conf, CONF_TYPE_SUBCONFIG, 0,0,0, NULL},
544 #ifdef CONFIG_RADIO
545 {"radio", radioopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
546 #else
547 {"radio", "MPlayer was compiled without Radio interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
548 #endif /* CONFIG_RADIO */
549 #ifdef CONFIG_TV
550 {"tv", (void *) tvopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
551 #else
552 {"tv", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
553 #endif /* CONFIG_TV */
554 #ifdef CONFIG_PVR
555 {"pvr", (void *) pvropts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
556 #else
557 {"pvr", "MPlayer was compiled without V4L2/PVR interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
558 #endif /* CONFIG_PVR */
559 {"vivo", (void *) vivoopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
560 #ifdef CONFIG_DVBIN
561 {"dvbin", (void *) dvbin_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
562 #endif
564 // ------------------------- a-v sync options --------------------
566 // AVI specific: A-V sync mode (bps vs. interleaving)
567 {"bps", &pts_from_bps, CONF_TYPE_FLAG, 0, 0, 1, NULL},
568 {"nobps", &pts_from_bps, CONF_TYPE_FLAG, 0, 1, 0, NULL},
570 // set A-V sync correction speed (0=disables it):
571 {"mc", &default_max_pts_correction, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
573 // force video/audio rate:
574 {"fps", &force_fps, CONF_TYPE_DOUBLE, CONF_MIN, 0, 0, NULL},
575 {"srate", &force_srate, CONF_TYPE_INT, CONF_RANGE, 1000, 8*48000, NULL},
576 OPT_INTRANGE("channels", audio_output_channels, 0, 1, 8),
577 OPT_AUDIOFORMAT("format", audio_output_format, 0),
578 OPT_FLOATRANGE("speed", playback_speed, 0, 0.01, 100.0),
580 // set a-v distance
581 {"delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -100.0, 100.0, NULL},
583 // ignore header-specified delay (dwStart)
584 {"ignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 0, 1, NULL},
585 {"noignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 1, 0, NULL},
587 OPT_FLOATRANGE("a52drc", drc_level, 0, 0, 2),
589 // ------------------------- codec/vfilter options --------------------
591 // MP3-only: select stereo/left/right
592 #ifdef CONFIG_FAKE_MONO
593 {"stereo", &fakemono, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
594 #endif
596 {"af*", &af_cfg.list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
597 {"af-adv", (void *) audio_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
599 OPT_SETTINGSLIST("vf*", vf_settings, 0, &vf_obj_list),
600 // select audio/video codec (by name) or codec family (by number):
601 {"afm", &audio_fm_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
602 {"vfm", &video_fm_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
603 {"ac", &audio_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
604 {"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
606 // postprocessing:
607 #ifdef CONFIG_FFMPEG
608 {"pp", &divx_quality, CONF_TYPE_INT, 0, 0, 0, NULL},
609 {"pphelp", &pp_help, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
610 #endif
612 // scaling:
613 {"sws", &sws_flags, CONF_TYPE_INT, 0, 0, 2, NULL},
614 {"ssf", (void *) scaler_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
615 OPT_MAKE_FLAGS("zoom", softzoom, 0),
616 OPT_FLOATRANGE("aspect", movie_aspect, 0, 0.1, 10.0),
617 OPT_FLAG_CONSTANTS("noaspect", movie_aspect, 0, 0, 0),
618 OPT_FLOATRANGE("xy", screen_size_xy, 0, 0.001, 4096),
620 OPT_FLAG_CONSTANTS("flip", flip, 0, -1, 1),
621 OPT_FLAG_CONSTANTS("noflip", flip, 0, -1, 0),
622 {"tsprog", &ts_prog, CONF_TYPE_INT, CONF_RANGE, 0, 65534, NULL},
623 {"tsprobe", &ts_probe, CONF_TYPE_POSITION, 0, 0, TS_MAX_PROBE_SIZE, NULL},
624 {"psprobe", &ps_probe, CONF_TYPE_POSITION, 0, 0, TS_MAX_PROBE_SIZE, NULL},
625 {"tskeepbroken", &ts_keep_broken, CONF_TYPE_FLAG, 0, 0, 1, NULL},
627 // draw by slices or whole frame (useful with libmpeg2/libavcodec)
628 OPT_MAKE_FLAGS("slices", vd_use_slices, 0),
629 {"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
631 #ifdef CONFIG_FFMPEG
632 {"lavdopts", (void *) lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
633 {"lavfdopts", (void *) lavfdopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
634 #endif
635 #ifdef CONFIG_XVID4
636 {"xvidopts", (void *)xvid_dec_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
637 #endif
638 {"codecs-file", &codecs_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
639 // ------------------------- subtitles options --------------------
641 OPT_STRINGLIST("sub", sub_name, 0),
642 OPT_PATHLIST("sub-paths", sub_paths, 0),
643 #ifdef CONFIG_FRIBIDI
644 {"fribidi-charset", &fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
645 {"flip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
646 {"noflip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
647 {"flip-hebrew-commas", &fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
648 {"noflip-hebrew-commas", &fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
649 #else
650 {"fribidi-charset", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
651 {"flip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
652 {"noflip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
653 {"flip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
654 {"noflip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
655 #endif /* CONFIG_FRIBIDI */
656 #ifdef CONFIG_ICONV
657 {"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL},
658 #endif
659 {"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
660 {"subfps", &sub_fps, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
661 OPT_MAKE_FLAGS("autosub", sub_auto, 0),
662 {"unicode", &sub_unicode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
663 {"nounicode", &sub_unicode, CONF_TYPE_FLAG, 0, 1, 0, NULL},
664 {"utf8", &sub_utf8, CONF_TYPE_FLAG, 0, 0, 1, NULL},
665 {"noutf8", &sub_utf8, CONF_TYPE_FLAG, 0, 1, 0, NULL},
666 {"forcedsubsonly", &forced_subs_only, CONF_TYPE_FLAG, 0, 0, 1, NULL},
667 // specify IFO file for VOBSUB subtitle
668 {"ifo", &spudec_ifo, CONF_TYPE_STRING, 0, 0, 0, NULL},
669 // enable Closed Captioning display
670 {"subcc", &subcc_enabled, CONF_TYPE_INT, CONF_RANGE, 0, 4, NULL},
671 {"nosubcc", &subcc_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL},
672 {"overlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 2, NULL},
673 {"nooverlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 0, NULL},
674 {"sub-bg-color", &sub_bg_color, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
675 {"sub-bg-alpha", &sub_bg_alpha, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
676 {"sub-no-text-pp", &sub_no_text_pp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
677 {"sub-fuzziness", &sub_match_fuzziness, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
678 {"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
679 {"subfont", &sub_font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
680 {"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL},
681 {"subpos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
682 {"subalign", &sub_alignment, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
683 {"subwidth", &sub_width_p, CONF_TYPE_INT, CONF_RANGE, 10, 100, NULL},
684 {"spualign", &spu_alignment, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL},
685 {"spuaa", &spu_aamode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
686 {"spugauss", &spu_gaussvar, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 3.0, NULL},
687 #ifdef CONFIG_FREETYPE
688 {"subfont-encoding", &subtitle_font_encoding, CONF_TYPE_STRING, 0, 0, 0, NULL},
689 {"subfont-text-scale", &text_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
690 {"subfont-osd-scale", &osd_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
691 {"subfont-blur", &subtitle_font_radius, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL},
692 {"subfont-outline", &subtitle_font_thickness, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL},
693 {"subfont-autoscale", &subtitle_autoscale, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
694 #endif
695 OPT_START_CONDITIONAL(CONFIG_ASS, "libass"),
696 OPT_MAKE_FLAGS("ass", ass_enabled, 0),
697 OPT_FLOATRANGE("ass-font-scale", ass_font_scale, 0, 0, 100),
698 OPT_FLOATRANGE("ass-line-spacing", ass_line_spacing, 0, -1000, 1000),
699 OPT_INTRANGE("ass-top-margin", ass_top_margin, 0, 0, 2000),
700 OPT_INTRANGE("ass-bottom-margin", ass_bottom_margin, 0, 0, 2000),
701 OPT_MAKE_FLAGS("ass-use-margins", ass_use_margins, 0),
702 OPT_MAKE_FLAGS("ass-vsfilter-aspect-compat", ass_vsfilter_aspect_compat, 0),
703 OPT_MAKE_FLAGS("embeddedfonts", use_embedded_fonts, 0),
704 OPT_STRINGLIST("ass-force-style", ass_force_style_list, 0),
705 OPT_STRING("ass-color", ass_color, 0),
706 OPT_STRING("ass-border-color", ass_border_color, 0),
707 OPT_STRING("ass-styles", ass_styles_file, 0),
708 OPT_INTRANGE("ass-hinting", ass_hinting, 0, 0, 7),
709 OPT_START_CONDITIONAL(1, ""),
710 #ifdef CONFIG_FONTCONFIG
711 {"fontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, -1, 1, NULL},
712 {"nofontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, 1, -1, NULL},
713 #else
714 {"fontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
715 {"nofontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
716 #endif /* CONFIG_FONTCONFIG */
717 {NULL, NULL, 0, 0, 0, 0, NULL}
720 #ifdef CONFIG_TV
721 const m_option_t tvscan_conf[]={
722 {"autostart", &stream_tv_defaults.scan, CONF_TYPE_FLAG, 0, 0, 1, NULL},
723 {"threshold", &stream_tv_defaults.scan_threshold, CONF_TYPE_INT, CONF_RANGE, 1, 100, NULL},
724 {"period", &stream_tv_defaults.scan_period, CONF_TYPE_FLOAT, CONF_RANGE, 0.1, 2.0, NULL},
725 {NULL, NULL, 0, 0, 0, 0, NULL}
727 #endif
729 const m_option_t mplayer_opts[]={
730 /* name, pointer, type, flags, min, max */
732 //---------------------- libao/libvo options ------------------------
733 OPT_STRINGLIST("vo", video_driver_list, 0),
734 OPT_STRINGLIST("ao", audio_driver_list, 0),
735 OPT_MAKE_FLAGS("fixed-vo", fixed_vo, CONF_GLOBAL),
736 OPT_MAKE_FLAGS("ontop", vo_ontop, 0),
737 {"rootwin", &vo_rootwin, CONF_TYPE_FLAG, 0, 0, 1, NULL},
738 {"border", &vo_border, CONF_TYPE_FLAG, 0, 0, 1, NULL},
739 {"noborder", &vo_border, CONF_TYPE_FLAG, 0, 1, 0, NULL},
741 {"mixer", &mixer_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
742 {"mixer-channel", &mixer_channel, CONF_TYPE_STRING, 0, 0, 0, NULL},
743 {"softvol", &soft_vol, CONF_TYPE_FLAG, 0, 0, 1, NULL},
744 {"nosoftvol", &soft_vol, CONF_TYPE_FLAG, 0, 1, 0, NULL},
745 {"softvol-max", &soft_vol_max, CONF_TYPE_FLOAT, CONF_RANGE, 10, 10000, NULL},
746 {"volstep", &volstep, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
747 {"volume", &start_volume, CONF_TYPE_FLOAT, CONF_RANGE, -1, 10000, NULL},
748 OPT_MAKE_FLAGS("gapless-audio", gapless_audio, 0),
749 // override audio buffer size (used only by -ao oss/win32, obsolete)
750 OPT_INT("abs", ao_buffersize, 0),
752 {"edlout", &edl_output_filename, CONF_TYPE_STRING, 0, 0, 0, NULL},
754 #ifdef CONFIG_X11
755 {"display", &mDisplayName, CONF_TYPE_STRING, 0, 0, 0, NULL},
756 #endif
758 #if defined(CONFIG_FBDEV) || defined(CONFIG_VESA)
759 {"monitor-hfreq", &monitor_hfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
760 {"monitor-vfreq", &monitor_vfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
761 {"monitor-dotclock", &monitor_dotclock_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
762 #endif
764 #ifdef CONFIG_FBDEV
765 {"fbmode", &fb_mode_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
766 {"fbmodeconfig", &fb_mode_cfgfile, CONF_TYPE_STRING, 0, 0, 0, NULL},
767 #endif
769 // force window width/height or resolution (with -vm)
770 OPT_INTRANGE("x", screen_size_x, 0, 0, 4096),
771 OPT_INTRANGE("y", screen_size_y, 0, 0, 4096),
772 // set screen dimensions (when not detectable or virtual!=visible)
773 OPT_INTRANGE("screenw", vo_screenwidth, CONF_NOSAVE, 0, 4096),
774 OPT_INTRANGE("screenh", vo_screenheight, CONF_NOSAVE, 0, 4096),
775 // Geometry string
776 {"geometry", &vo_geometry, CONF_TYPE_STRING, 0, 0, 0, NULL},
777 OPT_MAKE_FLAGS("force-window-position", force_window_position, 0),
778 // vo name (X classname) and window title strings
779 OPT_STRING("name", vo_winname, 0),
780 OPT_STRING("title", vo_wintitle, 0),
781 // set aspect ratio of monitor - useful for 16:9 TV-out
782 OPT_FLOATRANGE("monitoraspect", force_monitor_aspect, 0, 0.0, 9.0),
783 OPT_FLOATRANGE("monitorpixelaspect", monitor_pixel_aspect, 0, 0.2, 9.0),
784 // video mode switching: (x11,xv,dga)
785 OPT_MAKE_FLAGS("vm", vidmode, 0),
786 // start in fullscreen mode:
787 OPT_MAKE_FLAGS("fs", fullscreen, CONF_NOSAVE),
788 // set fullscreen switch method (workaround for buggy WMs)
789 {"fsmode-dontuse", &vo_fsmode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
790 // set bpp (x11+vm, dga, fbdev, vesa, svga?)
791 OPT_INTRANGE("bpp", vo_dbpp, 0, 0, 32),
792 {"colorkey", &vo_colorkey, CONF_TYPE_INT, 0, 0, 0, NULL},
793 {"nocolorkey", &vo_colorkey, CONF_TYPE_FLAG, 0, 0, 0x1000000, NULL},
794 {"double", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 0, 1, NULL},
795 {"nodouble", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 1, 0, NULL},
796 // wait for v-sync (vesa)
797 {"vsync", &vo_vsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
798 {"novsync", &vo_vsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
799 {"panscan", &vo_panscan, CONF_TYPE_FLOAT, CONF_RANGE, -1.0, 1.0, NULL},
800 OPT_FLOATRANGE("panscanrange", vo_panscanrange, 0, -19.0, 99.0),
801 OPT_CHOICE("colormatrix", requested_colorspace, 0,
802 ({"auto", MP_CSP_AUTO}, {"0", MP_CSP_AUTO},
803 {"BT.601", MP_CSP_BT_601}, {"sd", MP_CSP_BT_601}, {"1", MP_CSP_BT_601},
804 {"BT.709", MP_CSP_BT_709}, {"hd", MP_CSP_BT_709}, {"2", MP_CSP_BT_709},
805 {"SMPTE-240M", MP_CSP_SMPTE_240M}, {"3", MP_CSP_SMPTE_240M})),
806 OPT_CHOICE("colormatrix-input-range", requested_input_range, 0,
807 ({"auto", MP_CSP_LEVELS_AUTO},
808 {"limited", MP_CSP_LEVELS_TV},
809 {"full", MP_CSP_LEVELS_PC})),
810 OPT_CHOICE("colormatrix-output-range", requested_output_range, 0,
811 ({"auto", MP_CSP_LEVELS_AUTO},
812 {"limited", MP_CSP_LEVELS_TV},
813 {"full", MP_CSP_LEVELS_PC})),
815 {"grabpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
816 {"nograbpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 1, 0, NULL},
818 {"adapter", &vo_adapter_num, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL},
819 {"refreshrate",&vo_refresh_rate,CONF_TYPE_INT,CONF_RANGE, 0,100, NULL},
820 {"wid", &WinID, CONF_TYPE_INT64, 0, 0, 0, NULL},
821 #ifdef CONFIG_X11
822 {"stop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 0, 1, NULL},
823 {"nostop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 1, 0, NULL},
824 {"fstype", &vo_fstype_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
825 #endif
826 {"heartbeat-cmd", &heartbeat_cmd, CONF_TYPE_STRING, 0, 0, 0, NULL},
827 {"mouseinput", &vo_nomouse_input, CONF_TYPE_FLAG, 0, 1, 0, NULL},
828 {"nomouseinput", &vo_nomouse_input, CONF_TYPE_FLAG,0, 0, 1, NULL},
830 {"xineramascreen", &xinerama_screen, CONF_TYPE_INT, CONF_RANGE, -2, 32, NULL},
832 OPT_INTRANGE("brightness", vo_gamma_brightness, 0, -100, 100),
833 OPT_INTRANGE("saturation", vo_gamma_saturation, 0, -100, 100),
834 OPT_INTRANGE("contrast", vo_gamma_contrast, 0, -100, 100),
835 OPT_INTRANGE("hue", vo_gamma_hue, 0, -100, 100),
836 OPT_INTRANGE("gamma", vo_gamma_gamma, 0, -100, 100),
837 {"keepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
838 {"nokeepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 1, 0, NULL},
840 // direct rendering (decoding to video out buffer)
841 {"dr", &vo_directrendering, CONF_TYPE_FLAG, 0, 0, 1, NULL},
842 {"nodr", &vo_directrendering, CONF_TYPE_FLAG, 0, 1, 0, NULL},
844 //---------------------- mplayer-only options ------------------------
846 {"use-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
847 {"nouse-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
848 {"use-filename-title", &use_filename_title, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
849 {"nouse-filename-title", &use_filename_title, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
850 #ifdef CONFIG_CRASH_DEBUG
851 {"crash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
852 {"nocrash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
853 #endif
854 OPT_INTRANGE("osdlevel", osd_level, 0, 0, 3),
855 OPT_INTRANGE("osd-duration", osd_duration, 0, 0, 3600000),
856 OPT_INTRANGE("osd-fractions", osd_fractions, 0, 0, 2),
857 #ifdef CONFIG_MENU
858 {"menu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
859 {"nomenu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
860 {"menu-root", &menu_root, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
861 {"menu-cfg", &menu_cfg, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
862 {"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
863 {"menu-keepdir", &menu_keepdir, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
864 {"menu-chroot", &menu_chroot, CONF_TYPE_STRING, 0, 0, 0, NULL},
865 #ifdef CONFIG_FRIBIDI
866 {"menu-fribidi-charset", &menu_fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
867 {"menu-flip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
868 {"menu-noflip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
869 {"menu-flip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
870 {"menu-noflip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
871 #endif /* CONFIG_FRIBIDI */
872 #else
873 {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL},
874 #endif /* CONFIG_MENU */
876 OPT_STRING("vobsub", vobsub_name, 0),
877 {"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
878 #ifdef CONFIG_UNRAR_EXEC
879 {"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL},
880 #endif
882 {"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
884 {"framedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 1, NULL},
885 {"hardframedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 2, NULL},
886 {"noframedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 1, 0, NULL},
888 OPT_INTRANGE("autoq", auto_quality, 0, 0, 100),
890 OPT_FLAG_ON("benchmark", benchmark, 0),
892 // dump some stream out instead of playing the file
893 OPT_STRING("dumpfile", stream_dump_name, 0),
894 {"dumpaudio", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 1, NULL},
895 {"dumpvideo", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 2, NULL},
896 {"dumpsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 3, NULL},
897 {"dumpmpsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 4, NULL},
898 {"dumpstream", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 5, NULL},
899 {"dumpsrtsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 6, NULL},
900 {"dumpmicrodvdsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 7, NULL},
901 {"dumpjacosub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 8, NULL},
902 {"dumpsami", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 9, NULL},
904 OPT_MAKE_FLAGS("capture", capture_dump, 0),
906 #ifdef CONFIG_LIRC
907 {"lircconf", &lirc_configfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
908 #endif
910 {"leak-report", "", CONF_TYPE_PRINT, 0, 0, 0, (void*)1},
911 // these should be removed when gmplayer is forgotten
912 {"gui", "Internal GUI was removed. Use some other frontend instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
913 {"nogui", "Internal GUI was removed, -nogui is no longer valid.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
915 OPT_FLAG_CONSTANTS("noloop", loop_times, 0, 0, -1),
916 OPT_INTRANGE("loop", loop_times, 0, -1, 10000),
917 {"playlist", NULL, CONF_TYPE_STRING, CONF_NOCFG, 0, 0, NULL},
918 {"shuffle", NULL, CONF_TYPE_FLAG, CONF_NOCFG, 0, 0, NULL},
919 {"noshuffle", NULL, CONF_TYPE_FLAG, CONF_NOCFG, 0, 0, NULL},
921 OPT_MAKE_FLAGS("ordered-chapters", ordered_chapters, 0),
922 OPT_INTRANGE("chapter-merge-threshold", chapter_merge_threshold, 0, 0, 10000),
924 // a-v sync stuff:
925 OPT_MAKE_FLAGS("correct-pts", user_correct_pts, 0),
926 OPT_CHOICE("pts-association-mode", user_pts_assoc_mode, 0,
927 ({"auto", 0}, {"decoder", 1}, {"sort", 2})),
928 OPT_MAKE_FLAGS("initial-audio-sync", initial_audio_sync, 0),
929 OPT_CHOICE("hr-seek", hr_seek, 0,
930 ({"off", -1}, {"absolute", 0}, {"always", 1}, {"on", 1})),
931 OPT_FLAG_CONSTANTS("noautosync", autosync, 0, 0, -1),
932 OPT_INTRANGE("autosync", autosync, 0, 0, 10000),
934 OPT_FLAG_ON("softsleep", softsleep, 0),
935 #ifdef HAVE_RTC
936 OPT_MAKE_FLAGS("rtc", rtc, 0),
937 OPT_STRING("rtc-device", rtc_device, 0),
938 #endif
940 OPT_MAKE_FLAGS("term-osd", term_osd, 0),
941 OPT_STRING("term-osd-esc", term_osd_esc, 0),
942 OPT_STRING("playing-msg", playing_msg, 0),
944 {"slave", &slave_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},
945 OPT_MAKE_FLAGS("idle", player_idle_mode, CONF_GLOBAL),
946 OPT_INTRANGE("key-fifo-size", input.key_fifo_size, CONF_GLOBAL, 2, 65000),
947 OPT_MAKE_FLAGS("consolecontrols", consolecontrols, CONF_GLOBAL),
948 {"mouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
949 {"nomouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
950 OPT_INTRANGE("doubleclick-time", doubleclick_time, 0, 0, 1000),
951 #ifdef CONFIG_TV
952 {"tvscan", (void *) tvscan_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
953 #else
954 {"tvscan", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
955 #endif /* CONFIG_TV */
957 OPT_FLAG_ON("list-properties", list_properties, CONF_GLOBAL),
958 {"identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_FLAG, CONF_GLOBAL, 0, MSGL_V, NULL},
959 {"-help", (void *) help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
960 {"help", (void *) help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
961 {"h", (void *) help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
963 {NULL, NULL, 0, 0, 0, 0, NULL}
966 #endif /* MPLAYER_CFG_MPLAYER_H */