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

Daniel Egger degger at fhm.edu
Sun Feb 24 17:30:27 CET 2002


Albeu wrote:

> By principe I find this good but in practice you have missed some
> points.
> First DEMUXER_TYPE_MAX. I added an option to allow forcing demuxer selection,
> in case it's needed. So DEMUXER_TYPE_MAX must match the highest ,user
> selectable, demuxer number. Not +1, the user will be able to end up in a stupid
> situation (ie no demuxer have this number).

Probably doesn't belong in th enum.

> Then if DEMUXER_TYPE_DEMUXERS isn't numbered 18, it's because I don't want
> the user to be able to force this demuxer. It's only for internal use.
> So I decided, that normal demuxer will use only the first 16 bit.
> And special demuxers will use,the last 16 bit.

Not good. I'm using an array to dispatch the right functions, using high numbers
means that the array takes a lot of (unused) memery which will smash the caches.

> But I can't see how use it really with the last changes.

I don't exactly know where you're aiming but it doesn't seem like a good
idea to me to mix the special type DEMUXERS with the rest. I've an idea though:
We could remove the _MAX and replace the it by 
(sizeof (demuxer) / sizeof (demuxer_func)) - 1. This way the user won't be able
to select the last DEMUX which is your special case and the _MAX is gone.

-- 
Servus,
       Daniel




More information about the MPlayer-dev-eng mailing list