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

Alban Bedel albeu at free.fr
Mon Feb 25 11:34:54 CET 2002


Hi Daniel Egger,

on 24 Feb 2002 23:39:17 +0100 you wrote:

> Hi Alban,
> 
> > > > Anyway using an array like you have done isn't the right way.
> 
> > > Convince me otherwise. :)
> 
> > > > You should put the functions inside the demuxer_t struct itself.
> > > > Then during opening, the demuxer itself fill this fields with the
> > > > correct function. It's the same thing but it doesn't need any array
> > > > or things like that. Even cleaner :)
> 
> > > Sound like you thought about it; unfortunately I've no idea what exactly
> > > you would change so please elaborate or change it and I'll see. :)
> 
> > I'm not fighting about who is right.
> 
> Neither do I.
> 
> > If you want to see something happen, do it but you must accept critcs
> > from other ppl who alredy work on the project.
> 
> It's not about critics here, is it? I was kindly asking you to explain
> what you meant by the above quote paragraph because I can't quite
> follow. So, would you PLEASE?
Critics are in the other thread (if we can call this a thread), I agree at 100% with
Apri and I try to say the same thing about how you should do. Explain ? Here :

typedef int (demx_fill_buffer_func*)(demuxer_t* demux, ....other args....);

struct demuxer_t {
	......
	demux_fill_buffer_func fill_buffer;
	demux_seek_func seek;
	......
}

Then in demux fill :
	demuxer->fill_buffer(demuxer,ds);

That's all. Cleaner, simpler.
	Albeu



More information about the MPlayer-dev-eng mailing list