Mercurial > mplayer.hg
comparison cfg-mencoder.h @ 10594:57bdcdb061d7
Removed the historic cfgparser and switched full to the new config parser (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies.
author | alex |
---|---|
date | Wed, 13 Aug 2003 16:29:32 +0000 |
parents | 4cf6eae8b41e |
children | f2961e14874e |
comparison
equal
deleted
inserted
replaced
10593:27711ab2889f | 10594:57bdcdb061d7 |
---|---|
15 extern int readPPOpt(void *, char *arg); | 15 extern int readPPOpt(void *, char *arg); |
16 extern void revertPPOpt(void *conf, char* opt); | 16 extern void revertPPOpt(void *conf, char* opt); |
17 extern char *pp_help; | 17 extern char *pp_help; |
18 | 18 |
19 #ifdef HAVE_DIVX4ENCORE | 19 #ifdef HAVE_DIVX4ENCORE |
20 extern struct config divx4opts_conf[]; | 20 extern m_option_t divx4opts_conf[]; |
21 #endif | 21 #endif |
22 | 22 |
23 #ifdef HAVE_MP3LAME | 23 #ifdef HAVE_MP3LAME |
24 struct config lameopts_conf[]={ | 24 m_option_t lameopts_conf[]={ |
25 {"q", &lame_param_quality, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL}, | 25 {"q", &lame_param_quality, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL}, |
26 {"aq", &lame_param_algqual, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL}, | 26 {"aq", &lame_param_algqual, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL}, |
27 {"vbr", &lame_param_vbr, CONF_TYPE_INT, CONF_RANGE, 0, vbr_max_indicator, NULL}, | 27 {"vbr", &lame_param_vbr, CONF_TYPE_INT, CONF_RANGE, 0, vbr_max_indicator, NULL}, |
28 {"cbr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, 0, NULL}, | 28 {"cbr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, 0, NULL}, |
29 {"abr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, vbr_abr, NULL}, | 29 {"abr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, vbr_abr, NULL}, |
43 {NULL, NULL, 0, 0, 0, 0, NULL} | 43 {NULL, NULL, 0, 0, 0, 0, NULL} |
44 }; | 44 }; |
45 #endif | 45 #endif |
46 | 46 |
47 #ifdef USE_LIBAVCODEC | 47 #ifdef USE_LIBAVCODEC |
48 extern struct config lavcopts_conf[]; | 48 extern m_option_t lavcopts_conf[]; |
49 #endif | 49 #endif |
50 | 50 |
51 #ifdef USE_WIN32DLL | 51 #ifdef USE_WIN32DLL |
52 extern struct config vfwopts_conf[]; | 52 extern m_option_t vfwopts_conf[]; |
53 #endif | 53 #endif |
54 | 54 |
55 #ifdef HAVE_XVID | 55 #ifdef HAVE_XVID |
56 extern struct config xvidencopts_conf[]; | 56 extern m_option_t xvidencopts_conf[]; |
57 #endif | 57 #endif |
58 | 58 |
59 extern struct config nuvopts_conf[]; | 59 extern m_option_t nuvopts_conf[]; |
60 | 60 |
61 struct config ovc_conf[]={ | 61 m_option_t ovc_conf[]={ |
62 {"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL}, | 62 {"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL}, |
63 {"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL}, | 63 {"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL}, |
64 {"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4, NULL}, | 64 {"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4, NULL}, |
65 // {"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL}, | 65 // {"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL}, |
66 {"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL}, | 66 {"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL}, |
97 #endif | 97 #endif |
98 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, | 98 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, |
99 {NULL, NULL, 0, 0, 0, 0, NULL} | 99 {NULL, NULL, 0, 0, 0, 0, NULL} |
100 }; | 100 }; |
101 | 101 |
102 struct config oac_conf[]={ | 102 m_option_t oac_conf[]={ |
103 {"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL}, | 103 {"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL}, |
104 {"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL}, | 104 {"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL}, |
105 #ifdef HAVE_MP3LAME | 105 #ifdef HAVE_MP3LAME |
106 {"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL}, | 106 {"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL}, |
107 #else | 107 #else |
115 #endif | 115 #endif |
116 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, | 116 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, |
117 {NULL, NULL, 0, 0, 0, 0, NULL} | 117 {NULL, NULL, 0, 0, 0, 0, NULL} |
118 }; | 118 }; |
119 | 119 |
120 struct config info_conf[]={ | 120 m_option_t info_conf[]={ |
121 {"name", &info_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, | 121 {"name", &info_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, |
122 {"artist", &info_artist, CONF_TYPE_STRING, 0, 0, 0, NULL}, | 122 {"artist", &info_artist, CONF_TYPE_STRING, 0, 0, 0, NULL}, |
123 {"genre", &info_genre, CONF_TYPE_STRING, 0, 0, 0, NULL}, | 123 {"genre", &info_genre, CONF_TYPE_STRING, 0, 0, 0, NULL}, |
124 {"subject", &info_subject, CONF_TYPE_STRING, 0, 0, 0, NULL}, | 124 {"subject", &info_subject, CONF_TYPE_STRING, 0, 0, 0, NULL}, |
125 {"copyright", &info_copyright, CONF_TYPE_STRING, 0, 0, 0, NULL}, | 125 {"copyright", &info_copyright, CONF_TYPE_STRING, 0, 0, 0, NULL}, |
135 " comment - general comments about the file or the subject of the file\n" | 135 " comment - general comments about the file or the subject of the file\n" |
136 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, | 136 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, |
137 {NULL, NULL, 0, 0, 0, 0, NULL} | 137 {NULL, NULL, 0, 0, 0, 0, NULL} |
138 }; | 138 }; |
139 | 139 |
140 struct config of_conf[]={ | 140 m_option_t of_conf[]={ |
141 {"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL}, | 141 {"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL}, |
142 {"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL}, | 142 {"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL}, |
143 {"help", "\nAvailable output formats:\n" | 143 {"help", "\nAvailable output formats:\n" |
144 " avi - Microsoft Audio/Video Interleaved\n" | 144 " avi - Microsoft Audio/Video Interleaved\n" |
145 " mpeg - MPEG-1 system stream format\n" | 145 " mpeg - MPEG-1 system stream format\n" |
146 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, | 146 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, |
147 {NULL, NULL, 0, 0, 0, 0, NULL} | 147 {NULL, NULL, 0, 0, 0, 0, NULL} |
148 }; | 148 }; |
149 | 149 |
150 static config_t mencoder_opts[]={ | 150 m_option_t mencoder_opts[]={ |
151 /* name, pointer, type, flags, min, max */ | 151 /* name, pointer, type, flags, min, max */ |
152 {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, /* this must be the first!!! */ | 152 {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, /* this must be the first!!! */ |
153 | 153 |
154 {"endpos", parse_end_at, CONF_TYPE_FUNC_PARAM, 0, 0, 0, NULL}, | 154 {"endpos", parse_end_at, CONF_TYPE_FUNC_PARAM, 0, 0, 0, NULL}, |
155 | 155 |