Mercurial > mplayer.hg
comparison libmpcodecs/ae_lame.c @ 21621:28ade900407d
Fix FIXME mp_msg levels and targets
author | reimar |
---|---|
date | Sat, 16 Dec 2006 19:59:37 +0000 |
parents | 0074c9c77a0e |
children | 5cd2a0041019 |
comparison
equal
deleted
inserted
replaced
21620:ef93ebaef504 | 21621:28ade900407d |
---|---|
71 | 71 |
72 static int pass; | 72 static int pass; |
73 | 73 |
74 static int bind_lame(audio_encoder_t *encoder, muxer_stream_t *mux_a) | 74 static int bind_lame(audio_encoder_t *encoder, muxer_stream_t *mux_a) |
75 { | 75 { |
76 mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_MP3AudioSelected); | 76 mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_MP3AudioSelected); |
77 mux_a->h.dwSampleSize=0; // VBR | 77 mux_a->h.dwSampleSize=0; // VBR |
78 mux_a->h.dwRate=encoder->params.sample_rate; | 78 mux_a->h.dwRate=encoder->params.sample_rate; |
79 mux_a->h.dwScale=encoder->params.samples_per_frame; // samples/frame | 79 mux_a->h.dwScale=encoder->params.samples_per_frame; // samples/frame |
80 if(sizeof(MPEGLAYER3WAVEFORMAT)!=30) mp_msg(MSGT_MENCODER,MSGL_WARN,MSGTR_MP3WaveFormatSizeNot30,sizeof(MPEGLAYER3WAVEFORMAT)); | 80 if(sizeof(MPEGLAYER3WAVEFORMAT)!=30) mp_msg(MSGT_MENCODER,MSGL_WARN,MSGTR_MP3WaveFormatSizeNot30,sizeof(MPEGLAYER3WAVEFORMAT)); |
81 mux_a->wf=malloc(sizeof(MPEGLAYER3WAVEFORMAT)); // should be 30 | 81 mux_a->wf=malloc(sizeof(MPEGLAYER3WAVEFORMAT)); // should be 30 |
142 (encoder->stream->size+(encoder->stream->h.dwLength>>1))/encoder->stream->h.dwLength; | 142 (encoder->stream->size+(encoder->stream->h.dwLength>>1))/encoder->stream->h.dwLength; |
143 encoder->stream->h.dwLength=encoder->stream->size; | 143 encoder->stream->h.dwLength=encoder->stream->size; |
144 encoder->stream->h.dwRate=encoder->stream->wf->nAvgBytesPerSec; | 144 encoder->stream->h.dwRate=encoder->stream->wf->nAvgBytesPerSec; |
145 encoder->stream->h.dwScale=1; | 145 encoder->stream->h.dwScale=1; |
146 encoder->stream->wf->nBlockAlign=1; | 146 encoder->stream->wf->nBlockAlign=1; |
147 mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_CBRAudioByterate, | 147 mp_msg(MSGT_MENCODER, MSGL_V, MSGTR_CBRAudioByterate, |
148 encoder->stream->h.dwRate,((MPEGLAYER3WAVEFORMAT*)(encoder->stream->wf))->nBlockSize); | 148 encoder->stream->h.dwRate,((MPEGLAYER3WAVEFORMAT*)(encoder->stream->wf))->nBlockSize); |
149 } | 149 } |
150 } | 150 } |
151 | 151 |
152 int mpae_init_lame(audio_encoder_t *encoder) | 152 int mpae_init_lame(audio_encoder_t *encoder) |
173 if(lame_param_br>0) lame_set_brate(lame,lame_param_br); | 173 if(lame_param_br>0) lame_set_brate(lame,lame_param_br); |
174 } | 174 } |
175 if(lame_param_mode>=0) lame_set_mode(lame,lame_param_mode); // j-st | 175 if(lame_param_mode>=0) lame_set_mode(lame,lame_param_mode); // j-st |
176 if(lame_param_ratio>0) lame_set_compression_ratio(lame,lame_param_ratio); | 176 if(lame_param_ratio>0) lame_set_compression_ratio(lame,lame_param_ratio); |
177 if(lame_param_scale>0) { | 177 if(lame_param_scale>0) { |
178 mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_SettingAudioInputGain, lame_param_scale); | 178 mp_msg(MSGT_MENCODER, MSGL_V, MSGTR_SettingAudioInputGain, lame_param_scale); |
179 lame_set_scale(lame,lame_param_scale); | 179 lame_set_scale(lame,lame_param_scale); |
180 } | 180 } |
181 if(lame_param_lowpassfreq>=-1) lame_set_lowpassfreq(lame,lame_param_lowpassfreq); | 181 if(lame_param_lowpassfreq>=-1) lame_set_lowpassfreq(lame,lame_param_lowpassfreq); |
182 if(lame_param_highpassfreq>=-1) lame_set_highpassfreq(lame,lame_param_highpassfreq); | 182 if(lame_param_highpassfreq>=-1) lame_set_highpassfreq(lame,lame_param_highpassfreq); |
183 #ifdef HAVE_MP3LAME_PRESET | 183 #ifdef HAVE_MP3LAME_PRESET |
184 if(lame_param_preset != NULL) { | 184 if(lame_param_preset != NULL) { |
185 mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_LamePresetEquals,lame_param_preset); | 185 mp_msg(MSGT_MENCODER, MSGL_V, MSGTR_LamePresetEquals,lame_param_preset); |
186 if(lame_presets_set(lame,lame_param_fast, (lame_param_vbr==0), lame_param_preset) < 0) | 186 if(lame_presets_set(lame,lame_param_fast, (lame_param_vbr==0), lame_param_preset) < 0) |
187 return 0; | 187 return 0; |
188 } | 188 } |
189 #endif | 189 #endif |
190 if(lame_init_params(lame) == -1) { | 190 if(lame_init_params(lame) == -1) { |
210 static int lame_presets_set( lame_t gfp, int fast, int cbr, const char* preset_name ) | 210 static int lame_presets_set( lame_t gfp, int fast, int cbr, const char* preset_name ) |
211 { | 211 { |
212 int mono = 0; | 212 int mono = 0; |
213 | 213 |
214 if (strcmp(preset_name, "help") == 0) { | 214 if (strcmp(preset_name, "help") == 0) { |
215 mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_LameVersion, get_lame_version(), get_lame_url()); | 215 mp_msg(MSGT_MENCODER, MSGL_FATAL, MSGTR_LameVersion, get_lame_version(), get_lame_url()); |
216 lame_presets_longinfo_dm(stderr); | 216 lame_presets_longinfo_dm(stderr); |
217 return -1; | 217 return -1; |
218 } | 218 } |
219 | 219 |
220 //aliases for compatibility with old presets | 220 //aliases for compatibility with old presets |
306 | 306 |
307 return 0; | 307 return 0; |
308 | 308 |
309 } | 309 } |
310 else { | 310 else { |
311 mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_LameVersion, get_lame_version(), get_lame_url()); | 311 mp_msg(MSGT_MENCODER, MSGL_FATAL, MSGTR_LameVersion, get_lame_version(), get_lame_url()); |
312 mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_InvalidBitrateForLamePreset); | 312 mp_msg(MSGT_MENCODER, MSGL_FATAL, MSGTR_InvalidBitrateForLamePreset); |
313 return -1; | 313 return -1; |
314 } | 314 } |
315 } | 315 } |
316 | 316 |
317 mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_LameVersion, get_lame_version(), get_lame_url()); | 317 mp_msg(MSGT_MENCODER, MSGL_FATAL, MSGTR_LameVersion, get_lame_version(), get_lame_url()); |
318 mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_InvalidLamePresetOptions); | 318 mp_msg(MSGT_MENCODER, MSGL_FATAL, MSGTR_InvalidLamePresetOptions); |
319 return -1; | 319 return -1; |
320 } | 320 } |
321 #endif | 321 #endif |
322 | 322 |
323 #ifdef HAVE_MP3LAME_PRESET | 323 #ifdef HAVE_MP3LAME_PRESET |
324 /* lame_presets_longinfo_dm | 324 /* lame_presets_longinfo_dm |
325 taken out of presets_longinfo_dm in lame-3.93.1/frontend/parse.c and modified */ | 325 taken out of presets_longinfo_dm in lame-3.93.1/frontend/parse.c and modified */ |
326 static void lame_presets_longinfo_dm ( FILE* msgfp ) | 326 static void lame_presets_longinfo_dm ( FILE* msgfp ) |
327 { | 327 { |
328 mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_LamePresetsLongInfo); | 328 mp_msg(MSGT_MENCODER, MSGL_FATAL, MSGTR_LamePresetsLongInfo); |
329 } | 329 } |
330 #endif | 330 #endif |