Enabling MP3 support in vlc

Jean-Paul Saman jpsaman at wxs.nl
Sun Feb 3 23:02:07 CET 2002


Christophe Massiot wrote:
> 
> At 17:26 +0100 10/01/02, Jean-Paul Saman wrote :
> 
> >  > >In which function are the file header examinated ? In ESRead or should
> >  > >ESSetProgram be told that a certain header needs a mad decoder?
> >  >
> >  > In your case it should be in ESInit. Currently there is no header
> >  > parsing at all, since the ES plug-in only supports video streams, and
> >  > video streams do not need extra headers (which is not the case of
> >  > .mp3 files).
> >Is the header then stripped of at some point ? Are MPEG 1/2/3 headers
> 
> It should be probably be stripped in the input plug-in. Another
> option would be to pass the raw header to the decoder and have the
> mad plug-in do what needs to be done.
> 
> >equal in length, so parsing it in ESInit won't mess up the stream.
> 
> I have absolutely no idea. AFAIK, this so-called .mp3 header isn't
> specified by MPEG, I do not know where it comes from. If you can find
> more info on it, I could have a look and give you better directions.
> 
Almost every mp3 file is built up of IDv3 tags and MPEG frames. It
starts with "ID3" followed by approximately 96 bytes of header data (see
www.id3.org). This information is only of interest to audio players and
user interfaces in general. 

The so called ID3 tags are only found at the begining and the end of an
mp3 file. They provide title, author and could even contain song lyrics.
In short nothing to do with the decoder.

> >Where is MPEG1_AUDIO_ES then handled or is it split somewhere into audio
> >ES and video ES stream?
> 
> input plug-in reads -> input plug-in demuxes -> packet goes to
> MPEG1_AUDIO_ES decoder_fifo -> packet is read in mad_libmad.c
> (associated with MPEG1_AUDIO_ES) -> output is written to the aout fifo
> 
> --
> Christophe Massiot.

Where do you exactly detect that a stream is of type MPEG1_AUDIO_ES? 
There should audio layer III be detected along side layer I and II in
SelectES file input_programs. Which variable in p_es tells it the data
is one of the layers? And in which code is that detected?

Bit 18 and 17 indicate the layers of MPEG (e.g. MPEG1), so 
18,17 -- 00 is reserver
      -- 01 layer III
      -- 10 layer II
      -- 11 layer I

Greetings,
Jean-Paul Saman

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/lists.html



More information about the vlc-devel mailing list