Mailing List archive

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

[vdr] Re: VDR Plugin System - First Step



On 10 May 2002 Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:

>> One more thing: the value of ConfigDirectory (internal to
>> vdr.c:main() should be available to the plugins to load specific
>> config files.
> 
> Making that directly available to plugins might not be a good idea,
> because then two plugins might use the same names for their config files.
> So I guess if we need this at all, it should be a function that returns
> a directory name that consists of the ConfigDirectory, plus a directory
> named like the plugin, as in
> 
>   /etc/vdr/plugins/dvd
> 
> (assuming that ConfigDirectory has been set to "/etc/vdr").
> VDR could take care that this directory and all intermediate directories
> actually exist when a plugin requests that name.

Yes, would be an option. But this would prevent that two plugins
use the same file.

To clarify what my problem is: the MP3/MPlayer patch has dual
functionality. And I don't thing that this could be build within
on plugin. But both parts use nearly the same code and config
files.

It would be nice, to have more than one plugin inside a shared
library and register all contained plugins after loading. e.g.
have a global AfterLoad() function which would call
RegisterPlugin() for every contained plugin.

> Sounds reasonable. But I tend to completely shut down VDR if one
> plugin returns 'false' from Start(), because this plugin might be
> vital for further operation of VDR.

What about different failing codes? This would leave it up to the
plugin to decide if VDR should abort or not.

> BTW: you do know that plugins can store setup parameters in VDR's
> 'setup.conf' file, right? What would these additional config files
> be for (just curious)?

Yes, but as the setup file layout is simple, some things a
difficult to store. And it would imply to have SetupMenu's for
all these things, which may be even more complicated.

I use a seperate config file to define different source
directories for MP3/MPlayer files. The user can switch between
them via menu, but have to edit the file manualy. The file could
look like this:

/mnt/home/mp3;Remote an Master;0
/mnt/cdrom;CDROM;1

I have now a running plugin with some basic functionality (i18n,
main menu). Setup things have to come. I'm going to release this
later as an example.

Found some more points:
-Each plugin should have a house keeping function which is called
during VDR's own house keeping.
-VDR shouldn't remove setup options from setup.conf which belong
to plugins not loaded at the moment.

-- 
Stefan Huelswitt
huels@iname.com  | http://home.pages.de/~nathan



Home | Main Index | Thread Index