Re: [GnomeMeeting-devel-list] New video input api for pwlib: plugins!



Le jeu 31/07/2003 à 12:03, PUYDT Julien a écrit :
> This is how it looks from the client perspective, now let's look at the
> driver author's perspective:
> * for the .cxx:
> <the class' functions definition, with the only notable difference that
> if PVideoInputMyPlugin::GetInputDeviceNames detects "/dev/foo", it will
> return "MYPLUGIN /dev/foo">
> ==> very little difference!

I just modified that: the driver will now just have to return
"/dev/foo"; the manager will do the job of adding the prefix. That is
convenient for several reasons:
* it makes it possible to make the GetDevice method public: if the
program asked to load a plugin, it can now ask to have one instance
created for it;
* the name of the plugin only appears in the exported in the
plugin_getname functions: there is now only one place to look at to
rename a plugin (well, there were other ways to do that, with a #define
notably, but this solution is more elegant IMHO).
* it puts the burden of managing the plugin in the manager!

Snark




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]