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
;
49 extern int vo_keepaspect
;
50 extern int vo_rootwin
;
52 extern int opt_screen_size_x
;
53 extern int opt_screen_size_y
;
54 extern int fullscreen
;
61 extern char *ao_outputfilename
;
62 extern int ao_pcm_waveheader
;
65 extern char *mDisplayName
;
67 extern int stop_xscreensaver
;
68 extern char **vo_fstype_list
;
69 extern int vo_nomouse_input
;
74 extern int menu_startup
;
78 extern int vo_zr_parseoption(m_option_t
* conf
, char *opt
, char * param
);
79 extern void vo_zr_revertoption(m_option_t
* opt
,char* pram
);
83 extern m_option_t dxr2_opts
[];
87 extern char * skinName
;
92 #ifdef HAVE_ODIVX_POSTPROCESS
93 extern int use_old_pp
;
97 extern int xinerama_screen
;
104 /* from libvo/aspect.c */
105 extern float monitor_aspect
;
106 extern float monitor_pixel_aspect
;
108 extern int sws_flags
;
109 extern int readPPOpt(void *conf
, char *arg
);
110 extern void revertPPOpt(void *conf
, char* opt
);
111 extern char* pp_help
;
113 m_option_t vd_conf
[]={
114 {"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
},
115 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
119 * CONF_TYPE_FUNC_FULL :
120 * allows own implementations for passing the params
122 * the function receives parameter name and argument (if it does not start with - )
123 * useful with a conf.name like 'aa*' to parse several parameters to a function
124 * return 0 =ok, but we didn't need the param (could be the filename)
125 * return 1 =ok, we accepted the param
126 * negative values: see cfgparser.h, ERR_XXX
131 m_option_t mplayer_opts
[]={
132 /* name, pointer, type, flags, min, max */
134 //---------------------- libao/libvo options ------------------------
135 {"o", "Option -o has been renamed to -vo (video-out), use -vo.\n",
136 CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
137 {"vo", &video_driver_list
, CONF_TYPE_STRING_LIST
, 0, 0, 0, NULL
},
138 {"ao", &audio_driver_list
, CONF_TYPE_STRING_LIST
, 0, 0, 0, NULL
},
139 {"fixed-vo", &fixed_vo
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 1, NULL
},
140 {"nofixed-vo", &fixed_vo
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 0, NULL
},
141 {"ontop", &vo_ontop
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
142 {"noontop", &vo_ontop
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
143 {"rootwin", &vo_rootwin
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
144 {"border", &vo_border
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
145 {"noborder", &vo_border
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
147 {"aop", "-aop is deprecated, use -af instead.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
148 {"dsp", "Use -ao oss:dsp_path.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
149 {"mixer", &mixer_device
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
150 {"mixer-channel", &mixer_channel
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
151 {"softvol", &soft_vol
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
152 {"nosoftvol", &soft_vol
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
153 {"softvol-max", &soft_vol_max
, CONF_TYPE_FLOAT
, CONF_RANGE
, 10, 10000, NULL
},
154 {"volstep", &volstep
, CONF_TYPE_INT
, CONF_RANGE
, 0, 100, NULL
},
155 {"master", "Option -master has been removed, use -af volume instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
156 // override audio buffer size (used only by -ao oss, anyway obsolete...)
157 {"abs", &ao_data
.buffersize
, CONF_TYPE_INT
, CONF_MIN
, 0, 0, NULL
},
160 {"aofile", "-aofile is deprecated. Use -ao pcm:file=<filename> instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
161 {"waveheader", "-waveheader is deprecated. Use -ao pcm:waveheader instead.\n", CONF_TYPE_PRINT
, 0, 0, 1, NULL
},
162 {"nowaveheader", "-nowaveheader is deprecated. Use -ao pcm:nowaveheader instead.\n", CONF_TYPE_PRINT
, 0, 1, 0, NULL
},
164 {"alsa", "-alsa has been removed. Remove it from your config file.\n",
165 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
166 {"noalsa", "-noalsa has been removed. Remove it from your config file.\n",
167 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
168 {"edlout", &edl_output_filename
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
171 {"display", &mDisplayName
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
176 {"z", "-z is replaced by -vo png:z=<0-9>\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
180 {"jpeg", "-jpeg is deprecated. Use -vo jpeg:options instead.\n",
181 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
184 {"sdl", "Use -vo sdl:driver=<driver> instead of -vo sdl -sdl driver.\n",
185 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
186 {"noxv", "-noxv is deprecated. Use -vo sdl:nohwaccel instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
187 {"forcexv", "-forcexv is deprecated. Use -vo sdl:forcexv instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
189 {"sdla", "Use -ao sdl:driver instead of -ao sdl -sdla driver.\n",
190 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
192 #if defined(HAVE_FBDEV)||defined(HAVE_VESA)
193 {"monitor-hfreq", &monitor_hfreq_str
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
194 {"monitor-vfreq", &monitor_vfreq_str
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
195 {"monitor-dotclock", &monitor_dotclock_str
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
199 {"fbmode", &fb_mode_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
200 {"fbmodeconfig", &fb_mode_cfgfile
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
203 #if DIRECTFBVERSION > 912
204 {"dfbopts", "-dfbopts is deprecated, use -vf directfb:dfbopts=... instead\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
208 // force window width/height or resolution (with -vm)
209 {"x", &opt_screen_size_x
, CONF_TYPE_INT
, CONF_RANGE
, 0, 4096, NULL
},
210 {"y", &opt_screen_size_y
, CONF_TYPE_INT
, CONF_RANGE
, 0, 4096, NULL
},
211 // set screen dimensions (when not detectable or virtual!=visible)
212 {"screenw", &vo_screenwidth
, CONF_TYPE_INT
, CONF_RANGE
|CONF_OLD
, 0, 4096, NULL
},
213 {"screenh", &vo_screenheight
, CONF_TYPE_INT
, CONF_RANGE
|CONF_OLD
, 0, 4096, NULL
},
215 {"geometry", &vo_geometry
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
216 // set aspect ratio of monitor - useful for 16:9 TVout
217 {"monitoraspect", &monitor_aspect
, CONF_TYPE_FLOAT
, CONF_RANGE
, 0.2, 9.0, NULL
},
218 {"monitorpixelaspect", &monitor_pixel_aspect
, CONF_TYPE_FLOAT
, CONF_RANGE
, 0.0, 9.0, NULL
},
219 // video mode switching: (x11,xv,dga)
220 {"vm", &vidmode
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
221 {"novm", &vidmode
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
222 // start in fullscreen mode:
223 {"fs", &fullscreen
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
224 {"nofs", &fullscreen
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
225 // set fullscreen switch method (workaround for buggy WMs)
226 {"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
},
227 {"fsmode-dontuse", &vo_fsmode
, CONF_TYPE_INT
, CONF_RANGE
, 0, 31, NULL
},
228 // set bpp (x11+vm, dga, fbdev, vesa, svga?)
229 {"bpp", &vo_dbpp
, CONF_TYPE_INT
, CONF_RANGE
, 0, 32, NULL
},
230 {"colorkey", &vo_colorkey
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
231 {"nocolorkey", &vo_colorkey
, CONF_TYPE_FLAG
, 0, 0, 0x1000000, NULL
},
232 // double buffering: (mga/xmga, xv, vidix, vesa, fbdev)
233 {"double", &vo_doublebuffering
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
234 {"nodouble", &vo_doublebuffering
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
235 // wait for v-sync (vesa)
236 {"vsync", &vo_vsync
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
237 {"novsync", &vo_vsync
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
238 {"panscan", &vo_panscan
, CONF_TYPE_FLOAT
, CONF_RANGE
, 0.0, 1.0, NULL
},
239 {"panscanrange", &vo_panscanrange
, CONF_TYPE_FLOAT
, CONF_RANGE
, -19.0, 99.0, NULL
},
241 {"grabpointer", &vo_grabpointer
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
242 {"nograbpointer", &vo_grabpointer
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
244 {"adapter", &vo_adapter_num
, CONF_TYPE_INT
, CONF_RANGE
, 0, 5, NULL
},
245 {"refreshrate",&vo_refresh_rate
,CONF_TYPE_INT
,CONF_RANGE
, 0,100, NULL
},
246 {"wid", &WinID
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
248 // x11,xv,xmga,xvidix
249 {"icelayer", "-icelayer is obsolete. Use -fstype layer:<number> instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
250 {"stop-xscreensaver", &stop_xscreensaver
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
251 {"nostop-xscreensaver", &stop_xscreensaver
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
252 {"stop_xscreensaver", "Use -stop-xscreensaver instead, options with _ have been obsoleted.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
253 {"fstype", &vo_fstype_list
, CONF_TYPE_STRING_LIST
, 0, 0, 0, NULL
},
254 {"nomouseinput", &vo_nomouse_input
, CONF_TYPE_FLAG
,0,0,-1,NULL
},
257 {"xineramascreen", &xinerama_screen
, CONF_TYPE_INT
, CONF_RANGE
, -2, 32, NULL
},
259 {"brightness",&vo_gamma_brightness
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
260 {"saturation",&vo_gamma_saturation
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
261 {"contrast",&vo_gamma_contrast
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
262 {"hue",&vo_gamma_hue
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
263 {"keepaspect", &vo_keepaspect
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
264 {"nokeepaspect", &vo_keepaspect
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
266 // direct rendering (decoding to video out buffer)
267 {"dr", &vo_directrendering
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
268 {"nodr", &vo_directrendering
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
269 {"vaa_dr", "-vaa_dr is obsolete, use -dr.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
270 {"vaa_nodr", "-vaa_nodr is obsolete, use -nodr.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
274 {"aa*", "-aa* is deprecated. Use -vo aa:suboption instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
279 {"zr*", vo_zr_parseoption
, CONF_TYPE_FUNC_FULL
, 0, 0, 0, &vo_zr_revertoption
},
283 {"dxr2", &dxr2_opts
, CONF_TYPE_SUBCONFIG
, 0, 0, 0, NULL
},
287 //---------------------- mplayer-only options ------------------------
290 {"crash-debug", &crash_debug
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
291 {"nocrash-debug", &crash_debug
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 1, 0, NULL
},
293 {"osdlevel", &osd_level
, CONF_TYPE_INT
, CONF_RANGE
, 0, 3, NULL
},
294 {"osd-duration", &osd_duration
, CONF_TYPE_INT
, CONF_MIN
, 0, 0, NULL
},
296 {"menu", &use_menu
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
297 {"nomenu", &use_menu
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 1, 0, NULL
},
298 {"menu-root", &menu_root
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
299 {"menu-cfg", &menu_cfg
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
300 {"menu-startup", &menu_startup
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
302 {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT
,0, 0, 0, NULL
},
305 // these should be moved to -common, and supported in MEncoder
306 {"vobsub", &vobsub_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
307 {"vobsubid", &vobsub_id
, CONF_TYPE_INT
, CONF_RANGE
, 0, 31, NULL
},
309 {"sstep", &step_sec
, CONF_TYPE_INT
, CONF_MIN
, 0, 0, NULL
},
311 {"framedrop", &frame_dropping
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
312 {"hardframedrop", &frame_dropping
, CONF_TYPE_FLAG
, 0, 0, 2, NULL
},
313 {"noframedrop", &frame_dropping
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
315 {"autoq", &auto_quality
, CONF_TYPE_INT
, CONF_RANGE
, 0, 100, NULL
},
317 {"benchmark", &benchmark
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
319 // dump some stream out instead of playing the file
320 // this really should be in MEncoder instead of MPlayer... -> TODO
321 {"dumpfile", &stream_dump_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
322 {"dumpaudio", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
323 {"dumpvideo", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 2, NULL
},
324 {"dumpsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 3, NULL
},
325 {"dumpmpsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 4, NULL
},
326 {"dumpstream", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 5, NULL
},
327 {"dumpsrtsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 6, NULL
},
328 {"dumpmicrodvdsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 7, NULL
},
329 {"dumpjacosub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 8, NULL
},
330 {"dumpsami", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 9, NULL
},
333 {"lircconf", &lirc_configfile
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
336 {"gui", "Please remove gui=yes from your config file. Run gmplayer if you want the GUI.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
337 // {"gui", &use_gui, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCMD, 0, 1, NULL},
338 // {"nogui", &use_gui, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
341 {"skin", &skinName
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
342 {"enqueue", &enqueue
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
343 {"noenqueue", &enqueue
, CONF_TYPE_FLAG
, 0, 0, 0, NULL
},
344 {"guiwid", &guiWinID
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
347 {"noloop", &loop_times
, CONF_TYPE_FLAG
, 0, 0, -1, NULL
},
348 {"loop", &loop_times
, CONF_TYPE_INT
, CONF_RANGE
, -1, 10000, NULL
},
349 {"playlist", NULL
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
352 {"noautosync", &autosync
, CONF_TYPE_FLAG
, 0, 0, -1, NULL
},
353 {"autosync", &autosync
, CONF_TYPE_INT
, CONF_RANGE
, 0, 10000, NULL
},
354 // {"dapsync", &dapsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
355 // {"nodapsync", &dapsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
357 {"softsleep", &softsleep
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
359 {"nortc", &nortc
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
360 {"rtc", &nortc
, CONF_TYPE_FLAG
, 0, 0, 0, NULL
},
361 {"rtc-device", &rtc_device
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
364 {"term-osd", &term_osd
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
365 {"noterm-osd", &term_osd
, CONF_TYPE_FLAG
, 0, 0, 0, NULL
},
366 {"term-osd-esc", &term_osd_esc
, CONF_TYPE_STRING
, 0, 0, 1, NULL
},
367 {"playing-msg", &playing_msg
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
369 {"slave", &slave_mode
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 1, NULL
},
370 {"idle", &player_idle_mode
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 1, NULL
},
371 {"noidle", &player_idle_mode
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 0, NULL
},
372 {"use-stdin", "-use-stdin has been renamed to -noconsolecontrols, use that instead.", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
373 {"key-fifo-size", &key_fifo_size
, CONF_TYPE_INT
, CONF_RANGE
, 2, 65000, NULL
},
374 {"noconsolecontrols", &noconsolecontrols
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
375 {"consolecontrols", &noconsolecontrols
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 0, NULL
},
378 #include "cfg-common.h"
381 {"list-properties", &list_properties
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
382 {"identify", &mp_msg_levels
[MSGT_IDENTIFY
], CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, MSGL_INFO
, NULL
},
383 {"-help", help_text
, CONF_TYPE_PRINT
, CONF_NOCFG
|CONF_GLOBAL
, 0, 0, NULL
},
384 {"help", help_text
, CONF_TYPE_PRINT
, CONF_NOCFG
|CONF_GLOBAL
, 0, 0, NULL
},
385 {"h", help_text
, CONF_TYPE_PRINT
, CONF_NOCFG
|CONF_GLOBAL
, 0, 0, NULL
},
387 {"vd", vd_conf
, CONF_TYPE_SUBCONFIG
, 0, 0, 0, NULL
},
388 {NULL
, NULL
, 0, 0, 0, 0, NULL
}