Mailing List archive

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

[vdr] Re: VDR Plugin System - First Step



On Fri, 10 May 2002, Klaus Schmidinger (KS) wrote:

KS> > If yes,
KS> > there should be a return value of Start() to signal that
KS> > starting the plugin failed due to some reason (e.g. missing
KS> > file). VDR could disable/unload the plugin for further
KS> > operation in this case.
KS>
KS> Sounds reasonable. But I tend to completely shut down VDR if one
KS> plugin returns 'false' from Start(), because this plugin might be
KS> vital for further operation of VDR.

ok, so Start() could return 1 if it failed, but not fatal, i.e. vdr should
be able to work without this plugin and 2 if vdr should exit.

But I think on something more general (maybe somethig for the future)
what about some kind of dependencies? e.g.

OSD plugins: standardOSD/LCD/newOSD (where newOSD is a replacement for the
standard osd plugin)
now the dependencies:
 - vdr _needs_ at least one OSD plugin.
 - newOSD and standardOSD couldn't be loaded at the same time.

now when vdr starts and there are several osd plugins specified on the
command line, vdr would first check if there are no plugins among them
which can't be used at the same time (e.g. vdr -PstandardOSD -PnewOSD
would exit immediately)

after that vdr would look if the standardOSD could be added to the list
without breaking the dependencies.

now do the same for all other plugins (like dvd etc)

then vdr loads all the specified plugins in the order of the dependencies
(e.g. if dvd depends on "at least one osd plugin", the osd plugins would
have to be loaded first)

I can't think on much dependencies at the moment, maybe something like
"playlist loader plugin" and "mp3", "mplayer" plugins ontop of it.
something like
 mp3->Requirenments() {
   Require("playlist loader plugin", m, n);
 }
would mean, that mp3 plugin requires "playlist loader plugin", version
between m and n. if m or n is 0, this means ver >= m or ver <= n
respectively. if m and n are 0, this means "any version of playlist loader
plugin"



I know this would require some work and this is only a quick idea, so
maybe this wouldn't even work. Of course, we would need some algorithm for
checking against dead loops (e.g. if plugin1 and plugin2 require each
other, they should be loaded both or none of them (?))


c ya
        Sergei
--
--------------------------------------------------------------------
         eMail:       Sergei.Haller@math.uni-giessen.de
--------------------------------------------------------------------
Be careful of reading health books, you might die of a misprint.
                -- Mark Twain





Home | Main Index | Thread Index