[MPlayer-G2-dev] Re: G2 CLI/GUI

D Richard Felker III dalias at aerifal.cx
Tue May 13 01:13:51 CEST 2003


On Tue, May 13, 2003 at 01:50:41AM +0300, Andriy N. Gritsenko wrote:
>     Hi, Balatoni Denes!
> 
> Sometime (on Tuesday, May 13 at  1:25) I've received something...
> 
> >> > Ok. How are you going to add plugins to g2 without asking/waiting for
> >> > weeks for somebody to commit your plugin to cvs ? You can make patch or
> >> > fork mplayer too, but distributing a binary (+ source) is IMHO more
> >> > flexible and convenient.
> 
> >> Huh? I didn't say anything about plugins being bad. What I said was
> >> that it's not acceptable to scan/load them all at startup. MPlayer
> >> MUST only load the stuff specifically requested by the user, so that
> >> it starts instantly.
> 
> >I understand that, an indeed this should be possible. However if there is a 
> >plugin, it has to be dlopened (or something) to tell what parameters it 
> >excpects - that is if plugins can be added any time. 
> 
> Nope. :)  You can only tell at first if plugin is really exist. Then you
> can dlopen() it only if you requested to. But all plugins are expected to
> have ModuleInfo structure with certain order of fields. May be we have to
> set there also some kind of magic ['M','P'] for example. So we will check
> it on open:

Right. But you don't have to check if it exists until someone tries to
create an instance and configure it. It's perfectly fine to open
and/or dlopen the file because the user has specifically attempted to
configure it. All that's not-ok is scanning all installed plugins on
startup to make a list.

> >Perhaps if a plugin is only opened when it's parameters are queried (and of 
> >course when it is used)  than everybody will be happy - a cli to mplayer has 
> >the choice not to query the plugin if it knows the parameters by heart.
> 
> I did it in the updated cfgparser.c - it remembers parameters for plugin
> from config(s) to apply it only when plugin is about to open. But it is
> details of implementation, nothing more, user application have to don't
> worry about that and even know. :)

Eh? What do you need to remember parameters for?

Rich




More information about the MPlayer-G2-dev mailing list