2001-11-02 01:25:13 +00:00
|
|
|
/*
|
|
|
|
* config for cfgparser
|
|
|
|
*/
|
|
|
|
|
2001-11-09 23:46:06 +00:00
|
|
|
#include "cfg-common.h"
|
|
|
|
|
2001-11-02 01:25:13 +00:00
|
|
|
#ifdef USE_FAKE_MONO
|
|
|
|
extern int fakemono; // defined in dec_audio.c
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_ODIVX_POSTPROCESS
|
|
|
|
extern int use_old_pp;
|
|
|
|
#endif
|
|
|
|
|
2001-12-02 20:03:26 +00:00
|
|
|
extern int sws_flags;
|
2001-12-26 19:45:49 +00:00
|
|
|
extern int readPPOpt(void *, char *arg);
|
2002-01-19 16:59:59 +00:00
|
|
|
extern int readNPPOpt(void *conf, char *arg);
|
|
|
|
extern void revertPPOpt(void *conf, char* opt);
|
2001-12-02 20:03:26 +00:00
|
|
|
|
2001-12-22 16:59:10 +00:00
|
|
|
#ifdef HAVE_DIVX4ENCORE
|
2002-04-11 02:52:03 +00:00
|
|
|
extern struct config divx4opts_conf[];
|
2001-12-22 16:59:10 +00:00
|
|
|
#endif
|
2001-11-02 03:22:33 +00:00
|
|
|
|
2001-12-06 22:27:09 +00:00
|
|
|
#ifdef HAVE_MP3LAME
|
2001-11-02 03:22:33 +00:00
|
|
|
struct config lameopts_conf[]={
|
2002-01-14 23:54:31 +00:00
|
|
|
{"q", &lame_param_quality, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
|
|
|
|
{"vbr", &lame_param_vbr, CONF_TYPE_INT, CONF_RANGE, 0, vbr_max_indicator, NULL},
|
|
|
|
{"cbr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, 0, NULL},
|
|
|
|
{"abr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, vbr_abr, NULL},
|
|
|
|
{"mode", &lame_param_mode, CONF_TYPE_INT, CONF_RANGE, 0, MAX_INDICATOR, NULL},
|
|
|
|
{"padding", &lame_param_padding, CONF_TYPE_INT, CONF_RANGE, 0, PAD_MAX_INDICATOR, NULL},
|
|
|
|
{"br", &lame_param_br, CONF_TYPE_INT, CONF_RANGE, 0, 1024, NULL},
|
|
|
|
{"ratio", &lame_param_ratio, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
|
|
|
|
{"help", "TODO: lameopts help!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
2001-11-03 23:01:17 +00:00
|
|
|
};
|
2001-12-06 22:27:09 +00:00
|
|
|
#endif
|
2001-11-03 23:01:17 +00:00
|
|
|
|
2001-12-22 14:32:08 +00:00
|
|
|
#ifdef USE_LIBAVCODEC
|
2002-04-11 02:52:03 +00:00
|
|
|
extern struct config lavcopts_conf[];
|
2001-12-22 14:32:08 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_WIN32DLL
|
|
|
|
struct config vfwopts_conf[]={
|
2002-01-14 23:54:31 +00:00
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
2001-12-22 14:32:08 +00:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2001-11-03 23:01:17 +00:00
|
|
|
struct config ovc_conf[]={
|
2002-01-14 23:54:31 +00:00
|
|
|
{"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL},
|
|
|
|
{"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL},
|
|
|
|
{"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4, NULL},
|
2002-04-11 02:52:03 +00:00
|
|
|
// {"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL},
|
2002-01-14 23:54:31 +00:00
|
|
|
{"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL},
|
2002-04-11 02:52:03 +00:00
|
|
|
// {"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL},
|
2002-02-07 20:22:03 +00:00
|
|
|
{"rawrgb", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAWRGB, NULL},
|
|
|
|
{"vfw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_VFW, NULL},
|
2002-04-12 21:50:38 +00:00
|
|
|
{"libdv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBDV, NULL},
|
2002-02-07 20:22:03 +00:00
|
|
|
{"help", "\nAvailable codecs:\n copy\n frameno\n divx4\n raw\n lavc\n rawrgb\n vfw\n null\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
2002-01-14 23:54:31 +00:00
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
2001-11-03 23:01:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct config oac_conf[]={
|
2002-01-14 23:54:31 +00:00
|
|
|
{"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL},
|
|
|
|
{"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL},
|
2001-12-06 22:27:09 +00:00
|
|
|
#ifdef HAVE_MP3LAME
|
2002-01-14 23:54:31 +00:00
|
|
|
{"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL},
|
|
|
|
{"help", "\nAvailable codecs:\n copy\n pcm\n mp3lame\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
2001-12-06 22:27:09 +00:00
|
|
|
#else
|
2002-01-14 23:54:31 +00:00
|
|
|
{"mp3lame", "MPlayer was compiled without libmp3lame support!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
{"help", "\nAvailable codecs:\n copy\n pcm\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
2001-12-06 22:27:09 +00:00
|
|
|
#endif
|
2002-01-14 23:54:31 +00:00
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
2001-11-02 03:22:33 +00:00
|
|
|
};
|
|
|
|
|
2002-01-15 01:03:22 +00:00
|
|
|
static config_t mencoder_opts[]={
|
2001-11-02 01:25:13 +00:00
|
|
|
/* name, pointer, type, flags, min, max */
|
2002-01-14 23:55:51 +00:00
|
|
|
{"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, /* this must be the first!!! */
|
2001-11-02 01:25:13 +00:00
|
|
|
|
2002-02-10 00:07:34 +00:00
|
|
|
// {"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
|
|
|
|
{"ss", &seek_to_sec, CONF_TYPE_STRING, CONF_MIN, 0, 0, NULL},
|
2002-01-15 00:20:50 +00:00
|
|
|
{"endpos", parse_end_at, CONF_TYPE_FUNC_PARAM, 0, 0, 0, NULL},
|
|
|
|
|
2002-01-14 23:54:31 +00:00
|
|
|
{"ofps", &force_ofps, CONF_TYPE_FLOAT, CONF_MIN, 0, 0, NULL},
|
|
|
|
{"o", &out_filename, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
2001-11-02 03:22:33 +00:00
|
|
|
|
2002-01-14 23:54:31 +00:00
|
|
|
{"x", &vo_w, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL},
|
|
|
|
{"y", &vo_h, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL},
|
2001-12-01 01:29:25 +00:00
|
|
|
|
2002-04-11 02:52:03 +00:00
|
|
|
// {"x0", &crop_x0, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL},
|
|
|
|
// {"y0", &crop_y0, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL},
|
2002-03-23 13:13:12 +00:00
|
|
|
|
2002-04-11 02:52:03 +00:00
|
|
|
// {"xsize", &crop_width, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL},
|
|
|
|
// {"ysize", &crop_height, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL},
|
2002-03-23 13:13:12 +00:00
|
|
|
|
2002-01-14 23:54:31 +00:00
|
|
|
{"mp3file", &mp3_filename, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
{"ac3file", &ac3_filename, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
2001-11-02 03:22:33 +00:00
|
|
|
|
2002-01-14 23:54:31 +00:00
|
|
|
// {"oac", &out_audio_codec, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
// {"ovc", &out_video_codec, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
{"oac", oac_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
|
|
|
{"ovc", ovc_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
2001-11-03 00:44:02 +00:00
|
|
|
|
2002-01-14 23:54:31 +00:00
|
|
|
{"ffourcc", &force_fourcc, CONF_TYPE_STRING, 0, 4, 4, NULL},
|
2001-12-22 14:32:08 +00:00
|
|
|
|
2002-01-14 23:54:31 +00:00
|
|
|
{"pass", &pass, CONF_TYPE_INT, CONF_RANGE,0,2, NULL},
|
|
|
|
{"passlogfile", &passtmpfile, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
2001-11-02 03:22:33 +00:00
|
|
|
|
2002-03-29 07:20:44 +00:00
|
|
|
#ifdef HAVE_DIVX4ENCORE
|
2002-01-14 23:54:31 +00:00
|
|
|
{"divx4opts", divx4opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
2001-12-22 16:59:10 +00:00
|
|
|
#endif
|
2001-12-06 22:27:09 +00:00
|
|
|
#ifdef HAVE_MP3LAME
|
2002-01-14 23:54:31 +00:00
|
|
|
{"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
2001-12-06 22:27:09 +00:00
|
|
|
#endif
|
2001-12-22 14:32:08 +00:00
|
|
|
#ifdef USE_LIBAVCODEC
|
2002-01-14 23:54:31 +00:00
|
|
|
{"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
2001-12-22 14:32:08 +00:00
|
|
|
#endif
|
|
|
|
#ifdef USE_WIN32DLL
|
2002-01-14 23:54:31 +00:00
|
|
|
{"vfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
2001-12-22 14:32:08 +00:00
|
|
|
#endif
|
2001-11-02 01:25:13 +00:00
|
|
|
|
2001-11-09 23:46:06 +00:00
|
|
|
#define MAIN_CONF
|
2001-11-02 01:25:13 +00:00
|
|
|
#include "cfg-common.h"
|
2001-11-09 23:46:06 +00:00
|
|
|
#undef MAIN_CONF
|
2001-11-02 01:25:13 +00:00
|
|
|
|
2002-01-14 23:54:31 +00:00
|
|
|
// {"quiet", &quiet, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
2002-01-14 23:55:51 +00:00
|
|
|
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 100, NULL},
|
|
|
|
{"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL},
|
2002-01-14 23:54:31 +00:00
|
|
|
// {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
// {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
// {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
2001-11-02 01:25:13 +00:00
|
|
|
};
|