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 extern char *dfb_params
;
23 extern int fakemono
; // defined in dec_audio.c
29 extern char *lirc_configfile
;
32 extern int vo_doublebuffering
;
36 extern int vo_directrendering
;
37 extern float vo_panscan
;
38 extern float vo_panscanrange
;
39 /* only used at startup (setting these values from configfile) */
40 extern int vo_gamma_brightness
;
41 extern int vo_gamma_saturation
;
42 extern int vo_gamma_contrast
;
43 extern int vo_gamma_hue
;
44 extern char *vo_geometry
;
47 extern int vo_keepaspect
;
48 extern int vo_rootwin
;
50 extern int opt_screen_size_x
;
51 extern int opt_screen_size_y
;
52 extern int fullscreen
;
57 extern char *ao_outputfilename
;
58 extern int ao_pcm_waveheader
;
61 extern char *mDisplayName
;
63 extern int stop_xscreensaver
;
64 extern char **vo_fstype_list
;
65 extern int vo_nomouse_input
;
70 extern int menu_startup
;
74 extern int vo_zr_parseoption(m_option_t
* conf
, char *opt
, char * param
);
75 extern void vo_zr_revertoption(m_option_t
* opt
,char* pram
);
79 extern m_option_t dxr2_opts
[];
83 extern char * skinName
;
89 extern int xinerama_screen
;
92 /* from libvo/aspect.c */
93 extern float monitor_aspect
;
94 extern float monitor_pixel_aspect
;
97 extern int readPPOpt(void *conf
, char *arg
);
98 extern void revertPPOpt(void *conf
, char* opt
);
100 extern int enable_mouse_movements
;
101 extern int use_filedir_conf
;
103 m_option_t vd_conf
[]={
104 {"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
},
105 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
109 * CONF_TYPE_FUNC_FULL :
110 * allows own implementations for passing the params
112 * the function receives parameter name and argument (if it does not start with - )
113 * useful with a conf.name like 'aa*' to parse several parameters to a function
114 * return 0 =ok, but we didn't need the param (could be the filename)
115 * return 1 =ok, we accepted the param
116 * negative values: see cfgparser.h, ERR_XXX
121 m_option_t mplayer_opts
[]={
122 /* name, pointer, type, flags, min, max */
124 //---------------------- libao/libvo options ------------------------
125 {"o", "Option -o has been renamed to -vo (video-out), use -vo.\n",
126 CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
127 {"vo", &video_driver_list
, CONF_TYPE_STRING_LIST
, 0, 0, 0, NULL
},
128 {"ao", &audio_driver_list
, CONF_TYPE_STRING_LIST
, 0, 0, 0, NULL
},
129 {"fixed-vo", &fixed_vo
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 1, NULL
},
130 {"nofixed-vo", &fixed_vo
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 0, NULL
},
131 {"ontop", &vo_ontop
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
132 {"noontop", &vo_ontop
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
133 {"rootwin", &vo_rootwin
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
134 {"border", &vo_border
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
135 {"noborder", &vo_border
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
137 {"aop", "-aop has been removed, use -af instead.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
138 {"dsp", "-dsp has been removed. Use -ao oss:dsp_path instead.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
139 {"mixer", &mixer_device
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
140 {"mixer-channel", &mixer_channel
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
141 {"softvol", &soft_vol
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
142 {"nosoftvol", &soft_vol
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
143 {"softvol-max", &soft_vol_max
, CONF_TYPE_FLOAT
, CONF_RANGE
, 10, 10000, NULL
},
144 {"volstep", &volstep
, CONF_TYPE_INT
, CONF_RANGE
, 0, 100, NULL
},
145 {"master", "Option -master has been removed, use -af volume instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
146 // override audio buffer size (used only by -ao oss, anyway obsolete...)
147 {"abs", &ao_data
.buffersize
, CONF_TYPE_INT
, CONF_MIN
, 0, 0, NULL
},
150 {"aofile", "-aofile has been removed. Use -ao pcm:file=<filename> instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
151 {"waveheader", "-waveheader has been removed. Use -ao pcm:waveheader instead.\n", CONF_TYPE_PRINT
, 0, 0, 1, NULL
},
152 {"nowaveheader", "-nowaveheader has been removed. Use -ao pcm:nowaveheader instead.\n", CONF_TYPE_PRINT
, 0, 1, 0, NULL
},
154 {"alsa", "-alsa has been removed. Remove it from your config file.\n",
155 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
156 {"noalsa", "-noalsa has been removed. Remove it from your config file.\n",
157 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
158 {"edlout", &edl_output_filename
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
161 {"display", &mDisplayName
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
166 {"z", "-z has been removed. Use -vo png:z=<0-9> instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
170 {"jpeg", "-jpeg has been removed. Use -vo jpeg:<options> instead.\n",
171 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
174 {"sdl", "Use -vo sdl:driver=<driver> instead of -vo sdl -sdl driver.\n",
175 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
176 {"noxv", "-noxv has been removed. Use -vo sdl:nohwaccel instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
177 {"forcexv", "-forcexv has been removed. Use -vo sdl:forcexv instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
179 {"sdla", "Use -ao sdl:driver instead of -ao sdl -sdla driver.\n",
180 CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
182 #if defined(HAVE_FBDEV)||defined(HAVE_VESA)
183 {"monitor-hfreq", &monitor_hfreq_str
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
184 {"monitor-vfreq", &monitor_vfreq_str
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
185 {"monitor-dotclock", &monitor_dotclock_str
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
189 {"fbmode", &fb_mode_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
190 {"fbmodeconfig", &fb_mode_cfgfile
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
193 #if DIRECTFBVERSION > 912
194 {"dfbopts", "-dfbopts has been removed. Use -vf directfb:dfbopts=... instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
198 // force window width/height or resolution (with -vm)
199 {"x", &opt_screen_size_x
, CONF_TYPE_INT
, CONF_RANGE
, 0, 4096, NULL
},
200 {"y", &opt_screen_size_y
, CONF_TYPE_INT
, CONF_RANGE
, 0, 4096, NULL
},
201 // set screen dimensions (when not detectable or virtual!=visible)
202 {"screenw", &vo_screenwidth
, CONF_TYPE_INT
, CONF_RANGE
|CONF_OLD
, 0, 4096, NULL
},
203 {"screenh", &vo_screenheight
, CONF_TYPE_INT
, CONF_RANGE
|CONF_OLD
, 0, 4096, NULL
},
205 {"geometry", &vo_geometry
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
206 // set aspect ratio of monitor - useful for 16:9 TVout
207 {"monitoraspect", &monitor_aspect
, CONF_TYPE_FLOAT
, CONF_RANGE
, 0.2, 9.0, NULL
},
208 {"monitorpixelaspect", &monitor_pixel_aspect
, CONF_TYPE_FLOAT
, CONF_RANGE
, 0.0, 9.0, NULL
},
209 // video mode switching: (x11,xv,dga)
210 {"vm", &vidmode
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
211 {"novm", &vidmode
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
212 // start in fullscreen mode:
213 {"fs", &fullscreen
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
214 {"nofs", &fullscreen
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
215 // set fullscreen switch method (workaround for buggy WMs)
216 {"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
},
217 {"fsmode-dontuse", &vo_fsmode
, CONF_TYPE_INT
, CONF_RANGE
, 0, 31, NULL
},
218 // set bpp (x11+vm, dga, fbdev, vesa, svga?)
219 {"bpp", &vo_dbpp
, CONF_TYPE_INT
, CONF_RANGE
, 0, 32, NULL
},
220 {"colorkey", &vo_colorkey
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
221 {"nocolorkey", &vo_colorkey
, CONF_TYPE_FLAG
, 0, 0, 0x1000000, NULL
},
222 {"double", &vo_doublebuffering
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
223 {"nodouble", &vo_doublebuffering
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
224 // wait for v-sync (vesa)
225 {"vsync", &vo_vsync
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
226 {"novsync", &vo_vsync
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
227 {"panscan", &vo_panscan
, CONF_TYPE_FLOAT
, CONF_RANGE
, 0.0, 1.0, NULL
},
228 {"panscanrange", &vo_panscanrange
, CONF_TYPE_FLOAT
, CONF_RANGE
, -19.0, 99.0, NULL
},
230 {"grabpointer", &vo_grabpointer
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
231 {"nograbpointer", &vo_grabpointer
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
233 {"adapter", &vo_adapter_num
, CONF_TYPE_INT
, CONF_RANGE
, 0, 5, NULL
},
234 {"refreshrate",&vo_refresh_rate
,CONF_TYPE_INT
,CONF_RANGE
, 0,100, NULL
},
235 {"wid", &WinID
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
237 // x11,xv,xmga,xvidix
238 {"icelayer", "-icelayer has been removed. Use -fstype layer:<number> instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
239 {"stop-xscreensaver", &stop_xscreensaver
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
240 {"nostop-xscreensaver", &stop_xscreensaver
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
241 {"stop_xscreensaver", "Use -stop-xscreensaver instead, options with _ have been obsoleted.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
242 {"fstype", &vo_fstype_list
, CONF_TYPE_STRING_LIST
, 0, 0, 0, NULL
},
243 {"nomouseinput", &vo_nomouse_input
, CONF_TYPE_FLAG
,0,0,-1,NULL
},
246 {"xineramascreen", &xinerama_screen
, CONF_TYPE_INT
, CONF_RANGE
, -2, 32, NULL
},
248 {"brightness",&vo_gamma_brightness
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
249 {"saturation",&vo_gamma_saturation
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
250 {"contrast",&vo_gamma_contrast
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
251 {"hue",&vo_gamma_hue
, CONF_TYPE_INT
, CONF_RANGE
, -100, 100, NULL
},
252 {"keepaspect", &vo_keepaspect
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
253 {"nokeepaspect", &vo_keepaspect
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
255 // direct rendering (decoding to video out buffer)
256 {"dr", &vo_directrendering
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
257 {"nodr", &vo_directrendering
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
258 {"vaa_dr", "-vaa_dr has been removed, use -dr.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
259 {"vaa_nodr", "-vaa_nodr has been removed, use -nodr.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
263 {"aa*", "-aa* has been removed. Use -vo aa:suboption instead.\n", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
268 {"zr*", vo_zr_parseoption
, CONF_TYPE_FUNC_FULL
, 0, 0, 0, &vo_zr_revertoption
},
272 {"dxr2", &dxr2_opts
, CONF_TYPE_SUBCONFIG
, 0, 0, 0, NULL
},
276 //---------------------- mplayer-only options ------------------------
278 {"use-filedir-conf", &use_filedir_conf
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
279 {"nouse-filedir-conf", &use_filedir_conf
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 1, 0, NULL
},
281 {"crash-debug", &crash_debug
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
282 {"nocrash-debug", &crash_debug
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 1, 0, NULL
},
284 {"osdlevel", &osd_level
, CONF_TYPE_INT
, CONF_RANGE
, 0, 3, NULL
},
285 {"osd-duration", &osd_duration
, CONF_TYPE_INT
, CONF_MIN
, 0, 0, NULL
},
287 {"menu", &use_menu
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
288 {"nomenu", &use_menu
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 1, 0, NULL
},
289 {"menu-root", &menu_root
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
290 {"menu-cfg", &menu_cfg
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
291 {"menu-startup", &menu_startup
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
293 {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT
,0, 0, 0, NULL
},
296 // these should be moved to -common, and supported in MEncoder
297 {"vobsub", &vobsub_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
298 {"vobsubid", &vobsub_id
, CONF_TYPE_INT
, CONF_RANGE
, 0, 31, NULL
},
300 {"sstep", &step_sec
, CONF_TYPE_INT
, CONF_MIN
, 0, 0, NULL
},
302 {"framedrop", &frame_dropping
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
303 {"hardframedrop", &frame_dropping
, CONF_TYPE_FLAG
, 0, 0, 2, NULL
},
304 {"noframedrop", &frame_dropping
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
306 {"autoq", &auto_quality
, CONF_TYPE_INT
, CONF_RANGE
, 0, 100, NULL
},
308 {"benchmark", &benchmark
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
310 // dump some stream out instead of playing the file
311 // this really should be in MEncoder instead of MPlayer... -> TODO
312 {"dumpfile", &stream_dump_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
313 {"dumpaudio", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
314 {"dumpvideo", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 2, NULL
},
315 {"dumpsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 3, NULL
},
316 {"dumpmpsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 4, NULL
},
317 {"dumpstream", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 5, NULL
},
318 {"dumpsrtsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 6, NULL
},
319 {"dumpmicrodvdsub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 7, NULL
},
320 {"dumpjacosub", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 8, NULL
},
321 {"dumpsami", &stream_dump_type
, CONF_TYPE_FLAG
, 0, 0, 9, NULL
},
324 {"lircconf", &lirc_configfile
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
327 {"gui", "The -gui option will only work as the first command line argument.\n", CONF_TYPE_PRINT
, 0, 0, 0, (void *)1},
328 {"nogui", "The -nogui option will only work as the first command line argument.\n", CONF_TYPE_PRINT
, 0, 0, 0, (void *)1},
331 {"skin", &skinName
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
332 {"enqueue", &enqueue
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
333 {"noenqueue", &enqueue
, CONF_TYPE_FLAG
, 0, 0, 0, NULL
},
334 {"guiwid", &guiWinID
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
337 {"noloop", &loop_times
, CONF_TYPE_FLAG
, 0, 0, -1, NULL
},
338 {"loop", &loop_times
, CONF_TYPE_INT
, CONF_RANGE
, -1, 10000, NULL
},
339 {"playlist", NULL
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
342 {"correct-pts", &correct_pts
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
343 {"no-correct-pts", &correct_pts
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
344 {"noautosync", &autosync
, CONF_TYPE_FLAG
, 0, 0, -1, NULL
},
345 {"autosync", &autosync
, CONF_TYPE_INT
, CONF_RANGE
, 0, 10000, NULL
},
346 // {"dapsync", &dapsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
347 // {"nodapsync", &dapsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
349 {"softsleep", &softsleep
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
351 {"nortc", &nortc
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
352 {"rtc", &nortc
, CONF_TYPE_FLAG
, 0, 0, 0, NULL
},
353 {"rtc-device", &rtc_device
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
356 {"term-osd", &term_osd
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
357 {"noterm-osd", &term_osd
, CONF_TYPE_FLAG
, 0, 0, 0, NULL
},
358 {"term-osd-esc", &term_osd_esc
, CONF_TYPE_STRING
, 0, 0, 1, NULL
},
359 {"playing-msg", &playing_msg
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
361 {"slave", &slave_mode
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 1, NULL
},
362 {"idle", &player_idle_mode
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 1, NULL
},
363 {"noidle", &player_idle_mode
, CONF_TYPE_FLAG
,CONF_GLOBAL
, 0, 0, NULL
},
364 {"use-stdin", "-use-stdin has been renamed to -noconsolecontrols, use that instead.", CONF_TYPE_PRINT
, 0, 0, 0, NULL
},
365 {"key-fifo-size", &key_fifo_size
, CONF_TYPE_INT
, CONF_RANGE
, 2, 65000, NULL
},
366 {"noconsolecontrols", &noconsolecontrols
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
367 {"consolecontrols", &noconsolecontrols
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 0, NULL
},
368 {"mouse-movements", &enable_mouse_movements
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
369 {"nomouse-movements", &enable_mouse_movements
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 0, NULL
},
370 {"doubleclick-time", &doubleclick_time
, CONF_TYPE_INT
, CONF_RANGE
, 0, 1000, NULL
},
373 #include "cfg-common.h"
376 {"list-properties", &list_properties
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
377 {"identify", &mp_msg_levels
[MSGT_IDENTIFY
], CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, MSGL_V
, NULL
},
378 {"-help", help_text
, CONF_TYPE_PRINT
, CONF_NOCFG
|CONF_GLOBAL
, 0, 0, NULL
},
379 {"help", help_text
, CONF_TYPE_PRINT
, CONF_NOCFG
|CONF_GLOBAL
, 0, 0, NULL
},
380 {"h", help_text
, CONF_TYPE_PRINT
, CONF_NOCFG
|CONF_GLOBAL
, 0, 0, NULL
},
382 {"vd", vd_conf
, CONF_TYPE_SUBCONFIG
, 0, 0, 0, NULL
},
383 {NULL
, NULL
, 0, 0, 0, 0, NULL
}