Mercurial > mplayer.hg
annotate cfg-mencoder.h @ 6584:07b8c8a03503
some cleanup, buggy->crashing, better info/comments
author | arpi |
---|---|
date | Fri, 28 Jun 2002 09:33:38 +0000 |
parents | e7c244db6174 |
children | 6cfc8fd31299 |
rev | line source |
---|---|
2618 | 1 /* |
2 * config for cfgparser | |
3 */ | |
4 | |
2790 | 5 #include "cfg-common.h" |
6 | |
2618 | 7 #ifdef USE_FAKE_MONO |
8 extern int fakemono; // defined in dec_audio.c | |
9 #endif | |
10 #ifdef HAVE_ODIVX_POSTPROCESS | |
11 extern int use_old_pp; | |
12 #endif | |
13 | |
3272 | 14 extern int sws_flags; |
3771 | 15 extern int readPPOpt(void *, char *arg); |
4256
bbaa26821fdf
Added reverting support for -aa* -zr* -pp and -npp options
albeu
parents:
4207
diff
changeset
|
16 extern int readNPPOpt(void *conf, char *arg); |
bbaa26821fdf
Added reverting support for -aa* -zr* -pp and -npp options
albeu
parents:
4207
diff
changeset
|
17 extern void revertPPOpt(void *conf, char* opt); |
3272 | 18 |
3663
9092546e7765
made divx4 optional (also configure checking needed) and added avcodec_close
alex
parents:
3657
diff
changeset
|
19 #ifdef HAVE_DIVX4ENCORE |
5553
38697931adf4
video codecs moved to libmpencoders, crop/scale removed, use -vop for that
arpi
parents:
5390
diff
changeset
|
20 extern struct config divx4opts_conf[]; |
3663
9092546e7765
made divx4 optional (also configure checking needed) and added avcodec_close
alex
parents:
3657
diff
changeset
|
21 #endif |
2626 | 22 |
6559
e7c244db6174
Added -user -pass options for http authentication.
bertrand
parents:
6084
diff
changeset
|
23 #ifdef STREAMING |
e7c244db6174
Added -user -pass options for http authentication.
bertrand
parents:
6084
diff
changeset
|
24 /* defined in network.c */ |
e7c244db6174
Added -user -pass options for http authentication.
bertrand
parents:
6084
diff
changeset
|
25 extern char *network_username; |
e7c244db6174
Added -user -pass options for http authentication.
bertrand
parents:
6084
diff
changeset
|
26 extern char *network_password; |
e7c244db6174
Added -user -pass options for http authentication.
bertrand
parents:
6084
diff
changeset
|
27 #endif |
e7c244db6174
Added -user -pass options for http authentication.
bertrand
parents:
6084
diff
changeset
|
28 |
3357 | 29 #ifdef HAVE_MP3LAME |
2626 | 30 struct config lameopts_conf[]={ |
4157 | 31 {"q", &lame_param_quality, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL}, |
5922
30eea1bd1b64
fixed bogus overloaded "q" parameter for lame mp3 encoding
rfelker
parents:
5848
diff
changeset
|
32 {"aq", &lame_param_algqual, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL}, |
4157 | 33 {"vbr", &lame_param_vbr, CONF_TYPE_INT, CONF_RANGE, 0, vbr_max_indicator, NULL}, |
34 {"cbr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, 0, NULL}, | |
35 {"abr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, vbr_abr, NULL}, | |
36 {"mode", &lame_param_mode, CONF_TYPE_INT, CONF_RANGE, 0, MAX_INDICATOR, NULL}, | |
37 {"padding", &lame_param_padding, CONF_TYPE_INT, CONF_RANGE, 0, PAD_MAX_INDICATOR, NULL}, | |
38 {"br", &lame_param_br, CONF_TYPE_INT, CONF_RANGE, 0, 1024, NULL}, | |
39 {"ratio", &lame_param_ratio, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, | |
5848
48a0667742b9
volume setting with lame - patch by silicon@falcon.sch.bme.hu
arpi
parents:
5780
diff
changeset
|
40 {"vol", &lame_param_scale, CONF_TYPE_FLOAT, CONF_RANGE, 0, 10, NULL}, |
4157 | 41 {"help", "TODO: lameopts help!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, |
42 {NULL, NULL, 0, 0, 0, 0, NULL} | |
2661 | 43 }; |
3357 | 44 #endif |
2661 | 45 |
3657
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
46 #ifdef USE_LIBAVCODEC |
5553
38697931adf4
video codecs moved to libmpencoders, crop/scale removed, use -vop for that
arpi
parents:
5390
diff
changeset
|
47 extern struct config lavcopts_conf[]; |
3657
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
48 #endif |
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
49 |
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
50 #ifdef USE_WIN32DLL |
6084 | 51 extern struct config vfwopts_conf[]; |
3657
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
52 #endif |
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
53 |
2661 | 54 struct config ovc_conf[]={ |
4157 | 55 {"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL}, |
56 {"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL}, | |
57 {"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4, NULL}, | |
5553
38697931adf4
video codecs moved to libmpencoders, crop/scale removed, use -vop for that
arpi
parents:
5390
diff
changeset
|
58 // {"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL}, |
4157 | 59 {"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL}, |
5553
38697931adf4
video codecs moved to libmpencoders, crop/scale removed, use -vop for that
arpi
parents:
5390
diff
changeset
|
60 // {"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL}, |
4575 | 61 {"rawrgb", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAWRGB, NULL}, |
62 {"vfw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_VFW, NULL}, | |
5578 | 63 {"libdv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBDV, NULL}, |
5678 | 64 {"help", "\nAvailable codecs:\n copy\n frameno\n rawrgb\n" |
65 #ifdef HAVE_DIVX4ENCORE | |
66 " divx4\n" | |
67 #endif | |
68 #ifdef USE_LIBAVCODEC | |
69 " lavc\n" | |
70 #endif | |
71 #ifdef USE_WIN32DLL | |
72 " vfw\n" | |
73 #endif | |
74 #ifdef HAVE_LIBDV095 | |
75 " libdv\n" | |
76 #endif | |
77 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, | |
4157 | 78 {NULL, NULL, 0, 0, 0, 0, NULL} |
2661 | 79 }; |
80 | |
81 struct config oac_conf[]={ | |
4157 | 82 {"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL}, |
83 {"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL}, | |
3357 | 84 #ifdef HAVE_MP3LAME |
4157 | 85 {"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL}, |
86 {"help", "\nAvailable codecs:\n copy\n pcm\n mp3lame\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, | |
3357 | 87 #else |
4157 | 88 {"mp3lame", "MPlayer was compiled without libmp3lame support!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, |
89 {"help", "\nAvailable codecs:\n copy\n pcm\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, | |
3357 | 90 #endif |
4157 | 91 {NULL, NULL, 0, 0, 0, 0, NULL} |
2626 | 92 }; |
93 | |
4162 | 94 static config_t mencoder_opts[]={ |
2618 | 95 /* name, pointer, type, flags, min, max */ |
4158
479c7828edbb
GLOBAL flags and other changes for new config - patch by Alban Bedel <albeu@free.fr>
arpi
parents:
4157
diff
changeset
|
96 {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, /* this must be the first!!! */ |
2618 | 97 |
4159
42fec596fe7c
-endpos option, patch by Fredrik Kuivinen <freku045@student.liu.se>
arpi
parents:
4158
diff
changeset
|
98 {"endpos", parse_end_at, CONF_TYPE_FUNC_PARAM, 0, 0, 0, NULL}, |
5974 | 99 |
100 // set output framerate - recommended for variable fps (.asf etc) files | |
101 // and for 29.97fps progressive mpeg2 streams | |
4157 | 102 {"ofps", &force_ofps, CONF_TYPE_FLOAT, CONF_MIN, 0, 0, NULL}, |
103 {"o", &out_filename, CONF_TYPE_STRING, 0, 0, 0, NULL}, | |
2626 | 104 |
5974 | 105 // limit number of skippable frames after a non-skipped one |
5629 | 106 {"skiplimit", &skip_limit, CONF_TYPE_INT, 0, 0, 0, NULL}, |
107 {"noskiplimit", &skip_limit, CONF_TYPE_FLAG, 0, 0, -1, NULL}, | |
108 {"noskip", &skip_limit, CONF_TYPE_FLAG, 0, 0, 0, NULL}, | |
109 | |
5780 | 110 {"x", "This option is obsolete, use -vop scale=w:h for scaling\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, |
111 {"xsize", "This option is obsolete, use -vop crop=w:h:x0:y0 for cropping\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, | |
5270 | 112 |
5974 | 113 // outut audio/video codec selection |
4157 | 114 {"oac", oac_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, |
115 {"ovc", ovc_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, | |
2643 | 116 |
5974 | 117 // override FOURCC in output file |
4157 | 118 {"ffourcc", &force_fourcc, CONF_TYPE_STRING, 0, 4, 4, NULL}, |
3657
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
119 |
4157 | 120 {"pass", &pass, CONF_TYPE_INT, CONF_RANGE,0,2, NULL}, |
121 {"passlogfile", &passtmpfile, CONF_TYPE_STRING, 0, 0, 0, NULL}, | |
2626 | 122 |
5390
386f6fcc92d5
libavcodec 2pass broke mencoder if divx4encore was not available. fixed.
rfelker
parents:
5376
diff
changeset
|
123 #ifdef HAVE_DIVX4ENCORE |
4157 | 124 {"divx4opts", divx4opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, |
3663
9092546e7765
made divx4 optional (also configure checking needed) and added avcodec_close
alex
parents:
3657
diff
changeset
|
125 #endif |
3357 | 126 #ifdef HAVE_MP3LAME |
4157 | 127 {"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, |
3357 | 128 #endif |
3657
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
129 #ifdef USE_LIBAVCODEC |
4157 | 130 {"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, |
3657
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
131 #endif |
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
132 #ifdef USE_WIN32DLL |
4157 | 133 {"vfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, |
3657
af1f8e2d693a
added libavcodec support (mjpeg,h263,rv10,mpeg1 codecs tested&working) and added -ffourcc option (force fourcc in ouput)
alex
parents:
3480
diff
changeset
|
134 #endif |
2618 | 135 |
2790 | 136 #define MAIN_CONF |
2618 | 137 #include "cfg-common.h" |
2790 | 138 #undef MAIN_CONF |
2618 | 139 |
4157 | 140 // {"quiet", &quiet, CONF_TYPE_FLAG, 0, 0, 1, NULL}, |
4158
479c7828edbb
GLOBAL flags and other changes for new config - patch by Alban Bedel <albeu@free.fr>
arpi
parents:
4157
diff
changeset
|
141 {"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 100, NULL}, |
479c7828edbb
GLOBAL flags and other changes for new config - patch by Alban Bedel <albeu@free.fr>
arpi
parents:
4157
diff
changeset
|
142 {"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL}, |
4157 | 143 // {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, |
144 // {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, | |
145 // {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, | |
146 {NULL, NULL, 0, 0, 0, 0, NULL} | |
2618 | 147 }; |