5 #include "cfg-common.h"
7 extern int noconsolecontrols
;
9 #if defined(HAVE_FBDEV)||defined(HAVE_VESA)
10 extern char *monitor_hfreq_str
;
11 extern char *monitor_vfreq_str
;
12 extern char *monitor_dotclock_str
;
16 extern char *fb_mode_cfgfile
;
17 extern char *fb_mode_name
;
20 #if DIRECTFBVERSION > 912
21 extern char *dfb_params
;
25 extern int fakemono
; // defined in dec_audio.c
31 extern char *lirc_configfile
;
34 extern int vo_doublebuffering
;
38 extern int vo_directrendering
;
39 extern float vo_panscan
;
40 extern float vo_panscanrange
;
41 /* only used at startup (setting these values from configfile) */
42 extern int vo_gamma_brightness
;
43 extern int vo_gamma_saturation
;
44 extern int vo_gamma_contrast
;
45 extern int vo_gamma_hue
;
46 extern char *vo_geometry
;
48 extern int vo_keepaspect
;
49 extern int vo_rootwin
;
51 extern int opt_screen_size_x
;
52 extern int opt_screen_size_y
;
53 extern int fullscreen
;
60 extern char *ao_outputfilename
;
61 extern int ao_pcm_waveheader
;
64 extern char *mDisplayName
;
66 extern int stop_xscreensaver
;
67 extern char **vo_fstype_list
;
68 extern int vo_nomouse_input
;
73 extern int menu_startup
;
77 extern int vo_zr_parseoption(m_option_t
* conf
, char *opt
, char * param
);
78 extern void vo_zr_revertoption(m_option_t
* opt
,char* pram
);
82 extern m_option_t dxr2_opts
[];
85 #ifdef STREAMING_LIVE555
87 extern int rtspStreamOverTCP
;
91 extern char * skinName
;
96 #ifdef HAVE_ODIVX_POSTPROCESS
97 extern int use_old_pp
;
101 extern int xinerama_screen
;
108 /* from libvo/aspect.c */
109 extern float monitor_aspect
;
111 extern int sws_flags
;
112 extern int readPPOpt(void *conf
, char *arg
);
113 extern void revertPPOpt(void *conf
, char* opt
);
114 extern char* pp_help
;
116 m_option_t vd_conf
[]={
117 {"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
},
118 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
122 * CONF_TYPE_FUNC_FULL :
123 * allows own implementations for passing the params
125 * the function receives parameter name and argument (if it does not start with - )
126 * useful with a conf.name like 'aa*' to parse several parameters to a function
127 * return 0 =ok, but we didn't need the param (could be the filename)
128 * return 1 =ok, we accepted the param
129 * negative values: see cfgparser.h, ERR_XXX
134 m_option_t mplayer_opts
[]={
135 /* name, pointer, type, flags, min, max */
137 //---------------------- libao/libvo options ------------------------
138 {"o", "Option -o has been renamed to -vo (video-out), use -vo.\n",
139 CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
140 {"vo", &video_driver_list
, CONF_TYPE_STRING_LIST
, 0, 0, 0, NULL
},
141 {"ao", &audio_driver_list
, CONF_TYPE_STRING_LIST
, 0, 0, 0, NULL
},
142 {"fixed-vo", &fixed_vo
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 1, NULL
},
143 {"nofixed-vo", &fixed_vo
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 0, NULL
},
144 {"ontop", &vo_ontop
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
145 {"noontop", &vo_ontop
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
146 {"rootwin", &vo_rootwin
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
148 {"aop", "-aop is deprecated, use -af instead.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
149 {"dsp", "Use -ao oss:dsp_path.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
150 {"mixer", &mixer_device
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
151 {"mixer-channel", &mixer_channel
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
152 {"softvol", &soft_vol
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
153 {"nosoftvol", &soft_vol
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
154 {"softvol-max", &soft_vol_max
, CONF_TYPE_FLOAT
, CONF_RANGE
, 10, 10000, NULL
},
155 {"volstep", &volstep
, CONF_TYPE_INT
, CONF_RANGE
, 0, 100, NULL
},
156 {"master", "Option -master has been removed, use -af volume instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
157 // override audio buffer size (used only by -ao oss, anyway obsolete...)
158 {"abs", &ao_data
.buffersize
, CONF_TYPE_INT
, CONF_MIN
, 0, 0, NULL
},
161 {"aofile", "-aofile is deprecated. Use -ao pcm:file=<filename> instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
162 {"waveheader", "-waveheader is deprecated. Use -ao pcm:waveheader instead.\n", CONF_TYPE_PRINT
, 0, 0, 1, NULL
},
163 {"nowaveheader", "-nowaveheader is deprecated. Use -ao pcm:nowaveheader instead.\n", CONF_TYPE_PRINT
, 0, 1, 0, NULL
},
165 {"alsa", "-alsa has been removed. Remove it from your config file.\n",
166 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
167 {"noalsa", "-noalsa has been removed. Remove it from your config file.\n",
168 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
170 {"edlout", &edl_output_filename
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
172 {"edlout", "MPlayer was compiled without EDL support.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
176 {"display", &mDisplayName
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
181 {"z", "-z is replaced by -vo png:z=<0-9>\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
185 {"jpeg", "-jpeg is deprecated. Use -vo jpeg:options instead.\n",
186 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
189 {"sdl", "Use -vo sdl:driver=<driver> instead of -vo sdl -sdl driver.\n",
190 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
191 {"noxv", "-noxv is deprecated. Use -vo sdl:nohwaccel instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
192 {"forcexv", "-forcexv is deprecated. Use -vo sdl:forcexv instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
194 {"sdla", "Use -ao sdl:driver instead of -ao sdl -sdla driver.\n",
195 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
197 #if defined(HAVE_FBDEV)||defined(HAVE_VESA)
198 {"monitor-hfreq", &monitor_hfreq_str
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
199 {"monitor-vfreq", &monitor_vfreq_str
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
200 {"monitor-dotclock", &monitor_dotclock_str
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
204 {"fbmode", &fb_mode_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
205 {"fbmodeconfig", &fb_mode_cfgfile
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
208 #if DIRECTFBVERSION > 912
209 {"dfbopts", "-dfbopts is deprecated, use -vf directfb:dfbopts=... instead\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
213 // force window width/height or resolution (with -vm)
214 {"x", &opt_screen_size_x
, CONF_TYPE_INT
, CONF_RANGE
, 0, 4096, NULL
},
215 {"y", &opt_screen_size_y
, CONF_TYPE_INT
, CONF_RANGE
, 0, 4096, NULL
},
216 // set screen dimensions (when not detectable or virtual!=visible)
217 {"screenw", &vo_screenwidth
, CONF_TYPE_INT
, CONF_RANGE
|CONF_OLD
, 0, 4096, NULL
},
218 {"screenh", &vo_screenheight
, CONF_TYPE_INT
, CONF_RANGE
|CONF_OLD
, 0, 4096, NULL
},
220 {"geometry", &vo_geometry
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
221 // set aspect ratio of monitor - useful for 16:9 TVout
222 {"monitoraspect", &monitor_aspect
, CONF_TYPE_FLOAT
, CONF_RANGE
, 0.2, 9.0, NULL
},
223 // video mode switching: (x11,xv,dga)
224 {"vm", &vidmode
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
225 {"novm", &vidmode
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
226 // start in fullscreen mode:
227 {"fs", &fullscreen
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
228 {"nofs", &fullscreen
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
229 // set fullscreen switch method (workaround for buggy WMs)
230 {"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
},
231 {"fsmode-dontuse", &vo_fsmode
, CONF_TYPE_INT
, CONF_RANGE
, 0, 31, NULL
},
232 // set bpp (x11+vm, dga, fbdev, vesa, svga?)
233 {"bpp", &vo_dbpp
, CONF_TYPE_INT
, CONF_RANGE
, 0, 32, NULL
},
234 {"colorkey", &vo_colorkey
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
235 {"nocolorkey", &vo_colorkey
, CONF_TYPE_FLAG
, 0, 0, 0x1000000, NULL
},
236 // double buffering: (mga/xmga, xv, vidix, vesa, fbdev)
237 {"double", &vo_doublebuffering
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
238 {"nodouble", &vo_doublebuffering
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
239 // wait for v-sync (vesa)
240 {"vsync", &vo_vsync
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
241 {"novsync", &vo_vsync
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
242 {"panscan", &vo_panscan
, CONF_TYPE_FLOAT
, CONF_RANGE
, 0.0, 1.0, NULL
},
243 {"panscanrange", &vo_panscanrange
, CONF_TYPE_FLOAT
, CONF_RANGE
, -19.0, 99.0, NULL
},
245 {"grabpointer", &vo_grabpointer
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
246 {"nograbpointer", &vo_grabpointer
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
248 {"adapter", &vo_adapter_num
, CONF_TYPE_INT
, CONF_RANGE
, 0, 5, NULL
},
249 {"refreshrate",&vo_refresh_rate
,CONF_TYPE_INT
,CONF_RANGE
, 0,100, NULL
},
250 {"wid", &WinID
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
252 // x11,xv,xmga,xvidix
253 {"icelayer", "-icelayer is obsolete. Use -fstype layer:<number> instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
254 {"stop-xscreensaver", &stop_xscreensaver
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
255 {"nostop-xscreensaver", &stop_xscreensaver
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
256 {"stop_xscreensaver", "Use -stop-xscreensaver instead, options with _ have been obsoleted.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
257 {"fstype", &vo_fstype_list
, CONF_TYPE_STRING_LIST
, 0, 0, 0, NULL
},
258 {"nomouseinput", &vo_nomouse_input
, CONF_TYPE_FLAG
,0,0,-1,NULL
},
262 {"xineramascreen", &xinerama_screen
, CONF_TYPE_INT
, CONF_RANGE
, 0, 32, NULL
},
265 {"brightness",&vo_gamma_brightness
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
266 {"saturation",&vo_gamma_saturation
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
267 {"contrast",&vo_gamma_contrast
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
268 {"hue",&vo_gamma_hue
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
269 {"keepaspect", &vo_keepaspect
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
270 {"nokeepaspect", &vo_keepaspect
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
272 // direct rendering (decoding to video out buffer)
273 {"dr", &vo_directrendering
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
274 {"nodr", &vo_directrendering
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
275 {"vaa_dr", "-vaa_dr is obsolete, use -dr.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
276 {"vaa_nodr", "-vaa_nodr is obsolete, use -nodr.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
280 {"aa*", "-aa* is deprecated. Use -vo aa:suboption instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
285 {"zr*", vo_zr_parseoption
, CONF_TYPE_FUNC_FULL
, 0, 0, 0, &vo_zr_revertoption
},
289 {"dxr2", &dxr2_opts
, CONF_TYPE_SUBCONFIG
, 0, 0, 0, NULL
},
292 #ifdef STREAMING_LIVE555
293 {"sdp", "-sdp is obsolete, use sdp://file instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
294 // -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP
295 {"rtsp-stream-over-tcp", &rtspStreamOverTCP
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
297 {"rtsp-stream-over-tcp", "RTSP support requires the \"LIVE555 Streaming Media\" libraries.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
300 //---------------------- mplayer-only options ------------------------
303 {"crash-debug", &crash_debug
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
304 {"nocrash-debug", &crash_debug
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 1, 0, NULL
},
306 {"osdlevel", &osd_level
, CONF_TYPE_INT
, CONF_RANGE
, 0, 3, NULL
},
308 {"menu", &use_menu
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
309 {"nomenu", &use_menu
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 1, 0, NULL
},
310 {"menu-root", &menu_root
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
311 {"menu-cfg", &menu_cfg
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
312 {"menu-startup", &menu_startup
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
314 {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT
,0, 0, 0, NULL
},
317 // these should be moved to -common, and supported in MEncoder
318 {"vobsub", &vobsub_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
319 {"vobsubid", &vobsub_id
, CONF_TYPE_INT
, CONF_RANGE
, 0, 31, NULL
},
321 {"sstep", &step_sec
, CONF_TYPE_INT
, CONF_MIN
, 0, 0, NULL
},
323 {"framedrop", &frame_dropping
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
324 {"hardframedrop", &frame_dropping
, CONF_TYPE_FLAG
, 0, 0, 2, NULL
},
325 {"noframedrop", &frame_dropping
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
327 {"autoq", &auto_quality
, CONF_TYPE_INT
, CONF_RANGE
, 0, 100, NULL
},
329 {"benchmark", &benchmark
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
331 // dump some stream out instead of playing the file
332 // this really should be in MEncoder instead of MPlayer... -> TODO
333 {"dumpfile", &stream_dump_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
334 {"dumpaudio", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
335 {"dumpvideo", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 2, NULL
},
336 {"dumpsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 3, NULL
},
337 {"dumpmpsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 4, NULL
},
338 {"dumpstream", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 5, NULL
},
339 {"dumpsrtsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 6, NULL
},
340 {"dumpmicrodvdsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 7, NULL
},
341 {"dumpjacosub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 8, NULL
},
342 {"dumpsami", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 9, NULL
},
345 {"lircconf", &lirc_configfile
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
348 {"gui", "Please remove gui=yes from your config file. Run gmplayer if you want the GUI.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
349 // {"gui", &use_gui, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCMD, 0, 1, NULL},
350 // {"nogui", &use_gui, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
353 {"skin", &skinName
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
354 {"enqueue", &enqueue
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
355 {"noenqueue", &enqueue
, CONF_TYPE_FLAG
, 0, 0, 0, NULL
},
356 {"guiwid", &guiWinID
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
359 {"noloop", &loop_times
, CONF_TYPE_FLAG
, 0, 0, -1, NULL
},
360 {"loop", &loop_times
, CONF_TYPE_INT
, CONF_RANGE
, -1, 10000, NULL
},
361 {"playlist", NULL
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
364 {"noautosync", &autosync
, CONF_TYPE_FLAG
, 0, 0, -1, NULL
},
365 {"autosync", &autosync
, CONF_TYPE_INT
, CONF_RANGE
, 0, 10000, NULL
},
366 // {"dapsync", &dapsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
367 // {"nodapsync", &dapsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
369 {"softsleep", &softsleep
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
371 {"nortc", &nortc
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
372 {"rtc", &nortc
, CONF_TYPE_FLAG
, 0, 0, 0, NULL
},
373 {"rtc-device", &rtc_device
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
376 {"slave", &slave_mode
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 1, NULL
},
377 {"idle", &player_idle_mode
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 1, NULL
},
378 {"noidle", &player_idle_mode
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 0, NULL
},
379 {"use-stdin", "-use-stdin has been renamed to -noconsolecontrols, use that instead.", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
380 {"key-fifo-size", &key_fifo_size
, CONF_TYPE_INT
, CONF_RANGE
, 2, 65000, NULL
},
381 {"noconsolecontrols", &noconsolecontrols
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
382 {"consolecontrols", &noconsolecontrols
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 0, NULL
},
385 #include "cfg-common.h"
388 {"identify", &identify
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
389 {"really-quiet", &verbose
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, -10, NULL
},
390 {"-help", help_text
, CONF_TYPE_PRINT
, CONF_NOCFG
|CONF_GLOBAL
, 0, 0, NULL
},
391 {"help", help_text
, CONF_TYPE_PRINT
, CONF_NOCFG
|CONF_GLOBAL
, 0, 0, NULL
},
392 {"h", help_text
, CONF_TYPE_PRINT
, CONF_NOCFG
|CONF_GLOBAL
, 0, 0, NULL
},
394 {"vd", vd_conf
, CONF_TYPE_SUBCONFIG
, 0, 0, 0, NULL
},
395 {NULL
, NULL
, 0, 0, 0, 0, NULL
}