[Bug 620323] [mpegaudioparse] Add support for LAME tags and adjust segments based on the padding information from it

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Aug 1 09:02:57 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=620323
  GStreamer | gst-plugins-good | 0.10.15

--- Comment #12 from Carlos Rafael Giani <dv at pseudoterminal.org> 2012-08-01 16:02:53 UTC ---
Sorry, I accidentally pressed the commit button too early :)

Continuing here:

If I am wrong, and the LAME padding is always shorter than one frame, then
perhaps mpegaudioparse could send the following in-band events downstream to
help the decoder: (1) an event containing the delay and padding information
from the LAME tag, (2) an event informing downstream that the frame that is
about to be pushed is the first one, (3) an event informing downstream that the
frame that is about to be pushed is the last one. (2) and (3) should respect
seeking; for example, if I seek to the beginning of the song, (2) should be
sent again. This way, the decoder could decode the frame as usual, then, with
the information from (1), if it is the first frame, throw away the first N
samples, if it is the last frame, shorten its duration. In a pre_push()
function, the timestamps could then be corrected by the length of the delay.

If the padding can be more than one frame, then I dont know what could be done.

As for mpg123, it does have internal support for gapless. If enabled, it
automatically throws away the null samples. However, that does not work well
with seeking using GstAudioDecoder, because every time I seek, a flush event is
generated, and as a consequence, I have to reset mpg123 (= recreate the decoder
handle). It loses all gapless information. This is because mpg123 is being used
without letting it handle seeking itself - mpegaudioparse is doing that now.
So, mpg123 is oblivious to the seeking. Possible solutions would be to either
feed back the gapless information into mpg123 (requiring modifications to the
mpg123 library), or rewrite the plugin from scratch using GstElement as the
base class (and that is something I really don't wanna do unless it is
absolutely necessary). Therefore, I don't think we could use mpg123's internal
gapless support, or any decoder's internal support, for that matter.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gstreamer-bugs mailing list