[vlc-devel] Re: Design Query
sigmunau at stud.ntnu.no
Wed Apr 20 18:34:50 CEST 2005
On Wed, Apr 20, 2005 at 07:42:38PM +0530, Gautam Morey wrote:
> Hi ,
> I was just going through VLC's design structure and had this nagging question:
> Why does one need to write a special demux for mpeg audio or video ,
> mp4 audio and video rather than having it under the demux for PS or TS
> . After all if mp3 is an MPEG standard and if you are reading from a
> file , doesn't the demuxer for a PS stream become a direct
> hierarchical choice ?
These special demuxers are for es streams. That is audio or video streams
with no system wrapper.
> Also what happens then if I have mp3 in a TS stream ? Does it call the
> mpga demux ? If it does then after having realised that it's an mp3
> stream ,which ASFIK is a logic implemented in ps.c and ts.c why go
> through all the redundancy again of checking for stream headers (ie
> according to mpga.c ) ?
It does not. The codec data are fed directly from the PS or TS demux to the
> Also another interesting thing... I removed the file extension off an
> ogg file and put a debug print in the mpga.c file . It so conforms
> that vlc calls the mpga demux first and at some level when it gets a
> return error decides to try out other available demuxes finally
> finding ogg!
> Could someone explain this to me please. How viable is doing the
> stream type confirmation on the input side itself rather than after a
> demux has been deployed .
In vlc a module is not "deployed" before the Open function returns success.
The stream type detection could have been done by the imput layer, but that
would have been much less flexible (you could for isntance not add a new
demuxer plugin to an existing vlc then), less elegant, and harder to
maintain. In vlc a module is selected by trying all modules with the same
capability, in order of their score. First one to return success is
selected. (It is possible to force a module, or to alter the order in which
they are tried, but this is the main idea).
> It would also be of immense help if someone can direct me to VLC's
> demux level design and whether its output for all the decoder modules
> that follow is the same?
I do not understand this question, and I belive it is too general. Take a
peek at the existing demuxers, and ask again if there is something you don't
at the end: Mind telling us what you plan to work on?
Edgar B. Schieldropsv 29-14
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel