2001-03-18 23:32:31 +00:00
|
|
|
/*
|
|
|
|
* config for cfgparser
|
|
|
|
*/
|
|
|
|
|
2001-11-09 23:46:06 +00:00
|
|
|
#include "cfg-common.h"
|
|
|
|
|
2001-11-03 02:55:03 +00:00
|
|
|
extern char *playlist_file;
|
2001-08-15 19:26:22 +00:00
|
|
|
|
2001-04-12 20:37:25 +00:00
|
|
|
#ifdef HAVE_FBDEV
|
|
|
|
extern char *fb_dev_name;
|
|
|
|
extern char *fb_mode_cfgfile;
|
|
|
|
extern char *fb_mode_name;
|
2001-04-15 20:31:58 +00:00
|
|
|
extern char *monitor_hfreq_str;
|
|
|
|
extern char *monitor_vfreq_str;
|
|
|
|
extern char *monitor_dotclock_str;
|
2001-04-12 20:37:25 +00:00
|
|
|
#endif
|
2001-04-19 20:11:27 +00:00
|
|
|
#ifdef HAVE_PNG
|
|
|
|
extern int z_compression;
|
|
|
|
#endif
|
2001-04-25 20:44:30 +00:00
|
|
|
#ifdef HAVE_SDL
|
2001-06-21 22:47:21 +00:00
|
|
|
//extern char *sdl_driver;
|
2001-04-25 20:44:30 +00:00
|
|
|
extern int sdl_noxv;
|
|
|
|
extern int sdl_forcexv;
|
2001-06-21 22:47:21 +00:00
|
|
|
//extern char *sdl_adriver;
|
2001-04-25 20:44:30 +00:00
|
|
|
#endif
|
2001-05-08 21:49:00 +00:00
|
|
|
#ifdef USE_FAKE_MONO
|
|
|
|
extern int fakemono; // defined in dec_audio.c
|
|
|
|
#endif
|
2001-04-25 20:44:30 +00:00
|
|
|
|
2001-06-17 20:38:02 +00:00
|
|
|
#ifdef HAVE_LIRC
|
|
|
|
extern char *lirc_configfile;
|
|
|
|
#endif
|
|
|
|
|
2001-07-30 02:00:54 +00:00
|
|
|
#ifndef USE_LIBVO2
|
2001-06-17 20:38:02 +00:00
|
|
|
extern int vo_doublebuffering;
|
2001-07-03 23:44:19 +00:00
|
|
|
extern int vo_fsmode;
|
2001-04-23 03:38:17 +00:00
|
|
|
extern int vo_dbpp;
|
2001-07-30 02:00:54 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_SUB
|
2001-05-08 19:39:21 +00:00
|
|
|
extern int sub_unicode;
|
2001-08-13 11:08:18 +00:00
|
|
|
extern int sub_utf8;
|
2001-10-10 13:07:42 +00:00
|
|
|
#ifdef USE_ICONV
|
|
|
|
extern char *sub_cp;
|
|
|
|
#endif
|
2001-07-30 02:00:54 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_OSD
|
|
|
|
extern int osd_level;
|
|
|
|
#endif
|
2001-04-12 20:37:25 +00:00
|
|
|
|
2001-06-12 14:24:26 +00:00
|
|
|
extern char *ao_outputfilename;
|
|
|
|
extern int ao_pcm_waveheader;
|
|
|
|
|
2001-05-31 22:32:58 +00:00
|
|
|
#ifdef HAVE_X11
|
|
|
|
extern char *mDisplayName;
|
|
|
|
#endif
|
|
|
|
|
2001-08-14 19:00:00 +00:00
|
|
|
#ifdef HAVE_AA
|
2001-08-15 19:26:22 +00:00
|
|
|
extern int vo_aa_parseoption(struct config * conf, char *opt, char * param);
|
2001-08-14 19:00:00 +00:00
|
|
|
#endif
|
|
|
|
|
2001-09-07 21:04:14 +00:00
|
|
|
#ifdef HAVE_NEW_GUI
|
|
|
|
extern char * skinName;
|
|
|
|
#endif
|
|
|
|
|
2001-10-13 15:45:01 +00:00
|
|
|
#ifdef HAVE_ODIVX_POSTPROCESS
|
|
|
|
extern int use_old_pp;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2001-10-03 14:41:53 +00:00
|
|
|
/* from libvo/aspect.c */
|
|
|
|
extern float monitor_aspect;
|
|
|
|
|
2001-08-15 19:26:22 +00:00
|
|
|
/*
|
|
|
|
* CONF_TYPE_FUNC_FULL :
|
|
|
|
* allows own implemtations for passing the params
|
|
|
|
*
|
|
|
|
* the function receives parameter name and argument (if it does not start with - )
|
|
|
|
* useful with a conf.name like 'aa*' to parse several parameters to a function
|
|
|
|
* return 0 =ok, but we didn't need the param (could be the filename)
|
|
|
|
* return 1 =ok, we accepted the param
|
|
|
|
* negative values: see cfgparser.h, ERR_XXX
|
|
|
|
*
|
|
|
|
* by Folke
|
|
|
|
*/
|
|
|
|
|
2001-03-18 23:32:31 +00:00
|
|
|
struct config conf[]={
|
2001-04-15 23:22:01 +00:00
|
|
|
/* name, pointer, type, flags, min, max */
|
|
|
|
{"include", cfg_include, CONF_TYPE_FUNC_PARAM, 0, 0, 0}, /* this must be the first!!! */
|
2001-11-02 00:32:35 +00:00
|
|
|
|
|
|
|
//---------------------- libao/libvo/mplayer options ------------------------
|
2001-04-15 23:22:01 +00:00
|
|
|
{"o", "Option -o has been renamed to -vo (video-out), use -vo !\n",
|
2001-03-19 03:45:49 +00:00
|
|
|
CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
|
2001-04-15 23:22:01 +00:00
|
|
|
{"vo", &video_driver, CONF_TYPE_STRING, 0, 0, 0},
|
2001-06-03 00:24:49 +00:00
|
|
|
{"ao", &audio_driver, CONF_TYPE_STRING, 0, 0, 0},
|
2001-07-02 19:25:34 +00:00
|
|
|
// {"dsp", &dsp, CONF_TYPE_STRING, CONF_NOCFG, 0, 0},
|
|
|
|
{"dsp", "Use -ao oss:dsp_path!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
|
2001-04-16 00:21:00 +00:00
|
|
|
{"mixer", &mixer_device, CONF_TYPE_STRING, 0, 0, 0},
|
2001-06-05 18:40:44 +00:00
|
|
|
{"master", &mixer_usemaster, CONF_TYPE_FLAG, 0, 0, 1},
|
2001-05-31 22:32:58 +00:00
|
|
|
#ifdef HAVE_X11
|
|
|
|
{"display", &mDisplayName, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
#endif
|
2001-04-26 15:50:45 +00:00
|
|
|
{"osdlevel", &osd_level, CONF_TYPE_INT, CONF_RANGE, 0, 2 },
|
2001-11-02 00:32:35 +00:00
|
|
|
|
2001-03-28 12:08:44 +00:00
|
|
|
#ifdef HAVE_FBDEV
|
2001-04-15 20:31:58 +00:00
|
|
|
{"fb", &fb_dev_name, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
{"fbmode", &fb_mode_name, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
{"fbmodeconfig", &fb_mode_cfgfile, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
{"monitor_hfreq", &monitor_hfreq_str, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
{"monitor_vfreq", &monitor_vfreq_str, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
{"monitor_dotclock", &monitor_dotclock_str, CONF_TYPE_STRING, 0, 0, 0},
|
2001-03-28 12:08:44 +00:00
|
|
|
#endif
|
2001-10-29 00:55:54 +00:00
|
|
|
// {"encode", &encode_name, CONF_TYPE_STRING, 0, 0, 0},
|
2001-07-30 02:00:54 +00:00
|
|
|
#ifdef USE_SUB
|
2001-04-15 23:22:01 +00:00
|
|
|
{"sub", &sub_name, CONF_TYPE_STRING, 0, 0, 0},
|
2001-10-10 13:07:42 +00:00
|
|
|
#ifdef USE_ICONV
|
|
|
|
{"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
#endif
|
2001-04-15 23:22:01 +00:00
|
|
|
{"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0},
|
|
|
|
{"subfps", &sub_fps, CONF_TYPE_FLOAT, 0, 0.0, 10.0},
|
2001-04-18 20:45:42 +00:00
|
|
|
{"noautosub", &sub_auto, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-05-08 19:39:21 +00:00
|
|
|
{"unicode", &sub_unicode, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"nounicode", &sub_unicode, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-08-13 11:08:18 +00:00
|
|
|
{"utf8", &sub_utf8, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"noutf8", &sub_utf8, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-07-30 02:00:54 +00:00
|
|
|
#endif
|
|
|
|
#ifdef USE_OSD
|
2001-04-15 23:22:01 +00:00
|
|
|
{"font", &font_name, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
{"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0},
|
2001-07-30 02:00:54 +00:00
|
|
|
#endif
|
2001-10-30 17:04:59 +00:00
|
|
|
// {"bg", &play_in_bg, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
// {"nobg", &play_in_bg, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-04-15 23:22:01 +00:00
|
|
|
{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0},
|
2001-06-01 22:48:50 +00:00
|
|
|
{"ss", &seek_to_sec, CONF_TYPE_STRING, CONF_MIN, 0, 0},
|
2001-10-23 20:15:00 +00:00
|
|
|
{"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0},
|
2001-10-22 14:42:47 +00:00
|
|
|
{"loop", &loop_times, CONF_TYPE_INT, CONF_RANGE, -1, 10000},
|
2001-04-15 23:22:01 +00:00
|
|
|
{"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-06-02 23:30:26 +00:00
|
|
|
{"abs", &ao_buffersize, CONF_TYPE_INT, CONF_MIN, 0, 0},
|
2001-04-15 23:22:01 +00:00
|
|
|
{"delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0},
|
2001-06-23 19:58:32 +00:00
|
|
|
|
2001-11-02 00:32:35 +00:00
|
|
|
{"alsa", "Option -alsa has been removed, new audio code doesn't need it! Remove it from your config file!\n",
|
2001-06-23 19:58:32 +00:00
|
|
|
CONF_TYPE_PRINT, 0, 0, 0},
|
2001-11-02 00:32:35 +00:00
|
|
|
{"noalsa", "Option -noalsa has been removed, new audio code doesn't need it! Remove it from your config file!\n",
|
2001-06-23 19:58:32 +00:00
|
|
|
CONF_TYPE_PRINT, 0, 0, 0},
|
|
|
|
|
2001-05-14 09:35:51 +00:00
|
|
|
{"framedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"hardframedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 2},
|
2001-05-14 09:37:44 +00:00
|
|
|
{"noframedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-06-13 21:55:24 +00:00
|
|
|
|
2001-11-02 00:32:35 +00:00
|
|
|
{"autoq", &auto_quality, CONF_TYPE_INT, CONF_RANGE, 0, 100},
|
|
|
|
|
2001-06-13 21:55:24 +00:00
|
|
|
{"benchmark", &benchmark, CONF_TYPE_FLAG, 0, 0, 1},
|
2001-05-14 09:35:51 +00:00
|
|
|
|
2001-04-20 18:28:13 +00:00
|
|
|
{"dumpfile", &stream_dump_name, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
{"dumpaudio", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"dumpvideo", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 2},
|
2001-06-23 19:58:32 +00:00
|
|
|
{"dumpsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 3},
|
2001-10-12 16:21:55 +00:00
|
|
|
{"dumpmpsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 4},
|
|
|
|
|
2001-06-12 14:24:26 +00:00
|
|
|
{"aofile", &ao_outputfilename, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
{"waveheader", &ao_pcm_waveheader, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"nowaveheader", &ao_pcm_waveheader, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-04-20 18:28:13 +00:00
|
|
|
|
2001-07-07 09:53:47 +00:00
|
|
|
{"dshow", &allow_dshow, CONF_TYPE_FLAG, 0, 0, 1}, // Is this still needed? atmos ::
|
2001-04-24 22:51:05 +00:00
|
|
|
{"nodshow", &allow_dshow, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-11-02 00:32:35 +00:00
|
|
|
|
2001-04-19 20:11:27 +00:00
|
|
|
#ifdef HAVE_PNG
|
2001-07-16 13:24:14 +00:00
|
|
|
{"z", &z_compression, CONF_TYPE_INT, CONF_RANGE, 0, 9},
|
2001-04-19 20:11:27 +00:00
|
|
|
#endif
|
2001-04-25 20:44:30 +00:00
|
|
|
#ifdef HAVE_SDL
|
2001-06-21 22:47:21 +00:00
|
|
|
{"sdl", "Use -vo sdl:driver instead of -vo sdl -sdl driver\n",
|
|
|
|
CONF_TYPE_PRINT, 0, 0, 0},
|
2001-04-25 20:44:30 +00:00
|
|
|
{"noxv", &sdl_noxv, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"forcexv", &sdl_forcexv, CONF_TYPE_FLAG, 0, 0, 1},
|
2001-06-21 22:47:21 +00:00
|
|
|
{"sdla", "Use -ao sdl:driver instead of -ao sdl -sdla driver\n",
|
|
|
|
CONF_TYPE_PRINT, 0, 0, 0},
|
2001-04-25 20:44:30 +00:00
|
|
|
#endif
|
2001-07-16 13:24:14 +00:00
|
|
|
{"x", &screen_size_x, CONF_TYPE_INT, CONF_RANGE, 0, 4096},
|
|
|
|
{"y", &screen_size_y, CONF_TYPE_INT, CONF_RANGE, 0, 4096},
|
|
|
|
{"xy", &screen_size_xy, CONF_TYPE_INT, CONF_RANGE, 0, 4096},
|
2001-10-20 22:29:29 +00:00
|
|
|
{"screenw", &vo_screenwidth, CONF_TYPE_INT, CONF_RANGE, 0, 4096},
|
|
|
|
{"screenh", &vo_screenheight, CONF_TYPE_INT, CONF_RANGE, 0, 4096},
|
2001-10-01 15:58:31 +00:00
|
|
|
{"aspect", &movie_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0},
|
2001-10-01 23:34:05 +00:00
|
|
|
{"noaspect", &movie_aspect, CONF_TYPE_FLAG, 0, 0, 0},
|
2001-10-03 14:41:53 +00:00
|
|
|
{"monitoraspect", &monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0},
|
2001-03-24 21:34:08 +00:00
|
|
|
{"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1},
|
2001-04-11 00:35:57 +00:00
|
|
|
{"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-04-15 23:22:01 +00:00
|
|
|
{"fs", &fullscreen, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"nofs", &fullscreen, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-05-11 14:52:06 +00:00
|
|
|
{"zoom", &softzoom, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"nozoom", &softzoom, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-05-12 01:56:31 +00:00
|
|
|
{"flip", &flip, CONF_TYPE_FLAG, 0, -1, 1},
|
|
|
|
{"noflip", &flip, CONF_TYPE_FLAG, 0, -1, 0},
|
2001-04-15 23:22:01 +00:00
|
|
|
|
2001-07-30 02:00:54 +00:00
|
|
|
#ifndef USE_LIBVO2
|
2001-04-13 13:47:36 +00:00
|
|
|
{"bpp", &vo_dbpp, CONF_TYPE_INT, CONF_RANGE, 0, 32},
|
2001-07-29 16:31:37 +00:00
|
|
|
{"fsmode", &vo_fsmode, CONF_TYPE_INT, CONF_RANGE, 0, 15},
|
2001-06-17 20:38:02 +00:00
|
|
|
{"double", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"nodouble", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-07-30 02:00:54 +00:00
|
|
|
#endif
|
|
|
|
|
2001-08-14 19:00:00 +00:00
|
|
|
#ifdef HAVE_AA
|
2001-08-15 19:26:22 +00:00
|
|
|
{"aa*", vo_aa_parseoption, CONF_TYPE_FUNC_FULL, 0, 0, 0 },
|
2001-08-14 19:00:00 +00:00
|
|
|
#endif
|
|
|
|
|
2001-11-02 00:32:35 +00:00
|
|
|
#ifdef HAVE_LIRC
|
|
|
|
{"lircconf", &lirc_configfile, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
#endif
|
|
|
|
|
2001-08-27 00:55:25 +00:00
|
|
|
{"gui", &use_gui, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"nogui", &use_gui, CONF_TYPE_FLAG, 0, 1, 0},
|
2001-08-14 19:00:00 +00:00
|
|
|
|
2001-09-07 21:04:14 +00:00
|
|
|
#ifdef HAVE_NEW_GUI
|
|
|
|
{"skin", &skinName, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
#endif
|
2001-11-02 00:32:35 +00:00
|
|
|
|
2001-11-14 00:26:28 +00:00
|
|
|
{"playlist", &playlist_file, CONF_TYPE_STRING, 0, 0, 0},
|
|
|
|
{"dapsync", &dapsync, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
{"nodapsync", &dapsync, CONF_TYPE_FLAG, 0, 1, 0},
|
|
|
|
{"softsleep", &softsleep, CONF_TYPE_FLAG, 0, 0, 1},
|
|
|
|
|
|
|
|
|
2001-11-09 23:46:06 +00:00
|
|
|
#define MAIN_CONF
|
2001-11-02 00:32:35 +00:00
|
|
|
#include "cfg-common.h"
|
2001-11-09 23:46:06 +00:00
|
|
|
#undef MAIN_CONF
|
2001-04-21 20:45:17 +00:00
|
|
|
|
2001-08-06 00:30:29 +00:00
|
|
|
{"quiet", &quiet, CONF_TYPE_FLAG, 0, 0, 1},
|
2001-04-15 23:22:01 +00:00
|
|
|
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE, 0, 100},
|
|
|
|
{"v", cfg_inc_verbose, CONF_TYPE_FUNC, 0, 0, 0},
|
2001-05-09 14:17:55 +00:00
|
|
|
{"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
|
|
|
|
{"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
|
|
|
|
{"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
|
2001-04-15 23:22:01 +00:00
|
|
|
{NULL, NULL, 0, 0, 0, 0}
|
2001-03-18 23:32:31 +00:00
|
|
|
};
|