GNOME Bugzilla – Bug 439390
[lame] fix up so we can control sample rate conversion
Last modified: 2007-09-26 14:46:15 UTC
After discussing with Wim, we agree two things should be done: A) lame should have a property (e.g. allow-rate-conversion) that is set to TRUE by default, allowing lame to resample internally. If it is set to FALSE, and lame cannot satisfy keeping the sample rate constant (because the bitrate doesn't match or filtercaps on either pad don't allow it) it should error with not-negotiated. B) lame should respect the filter caps on the src pad. This is probably a little more complicated to get right. Again, not-negiotated if lame cannot satisfy the src caps' rate. Doing this would allow us to correctly handle cases where we want to generate mp3 for playback in a Flash application, which only works correctly with 11.025/22.05/44.1, and makes other sample rates sound like smurf songs.
This looks like it has been fixed for the most part: 2007-09-24 Thomas Vander Stichele <thomas at apestaart dot org> * ext/lame/gstlame.c: Allow fixing the sample rate lame converts to by negotiating fixed sample rate on the src pad caps. Add docs for it. * tests/check/Makefile.am: * tests/check/pipelines/lame.c: Add a check for it. 2007-09-25 Tim-Philipp Müller <tim at centricular dot net> * ext/lame/gstlame.c: Use GST_PTR_FORMAT to print caps in debug statement. 2007-09-26 Tim-Philipp Müller <tim at centricular dot net> * ext/lame/gstlame.c: Fix up case where there is no peer, in which case _get_allowed_caps() will return NULL.