[MPlayer-dev-eng] [PATCH] Clean up demuxers

Arpi arpi at thot.banki.hu
Thu Feb 21 14:29:19 CET 2002


Hi,

> > Two things I had to do though: Convert all *_fill_* routines
> > to take exactly the same two parameters [demuxer_t *demux] and
> > [demux_stream_t* ds]. Since some of the demuxers derive ds from
> > demux and the other way round I wondered if this couldn't generally
> > be made as it saves a lot of overhead.
> > I also had to fix the return type to unsigned int and the declarations
> > to be extern because it annoyed me to death.

could you explain, why 
- you changed int to unsigned int?
- renamed variable demuxer to demux (resulting big cosmetics patch)
- added static array to demuxer.h ?

i really don't like this patch. it has no real value but does big cosmetics
changes which is not welcomed here.
anyway, you're right in one thing: that big switch(){...} is not good, and
slow. it was added when there were 3 demuxers... now there are 18...
anyway, i don't like the method you used to solve this. why don't we simply
use a function pointer ? and set up this pointer to the right demux_fill_*
stuff at demux_open() ? the same thing can happen with seek functions.
and finally it will move to a libao2/libvo-like modular API.

> By principe I find this good but in practice you have missed some points.
including RTFM patches.txt


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list