[vdr] Passing events to plugins or external programs

Marko Mäkelä marko.makela at hut.fi
Wed Sep 14 10:25:55 CEST 2005


I have equipped my vdr system with a solid-state relay that can power on
and off the monitor and speakers.  The relay should be connected to the
value of Setup.Suspend (see my patch from yesterday).

I am not too familiar with the plugin interface of vdr, but I got the
impression that the only way to implement such a relay control in a
plugin would be by polling, which is inefficient.

Are there any plans to allow plugins to register for updates of cSetup
variables?  (Or any plans for a svdrp interface to setting and querying
the variables, for that matter?)

Such an event interface could also be to a popen'ed child process.
Whenever something of interest happens, vdr would write a line to the
pipe.  At the very least, changes to setup variables (both vdr and
plugins) would be logged.  The child process would look for interesting
lines, such as "Setup.Suspend=0" or "Setup.Suspend=1" in the case of
relay control.  Other events that could be logged would be changes in
aspect ratio and play mode.

Making the event interface to a child process would avoid licensing
problems.  Before I decided to build a solid-state relay box myself,
I searched for existing solutions.  I found a manufacturer of
USB-controlled power outlets that appeared to supply Linux drivers.
Unfortunately, the driver turned out to be a closed-source library,
which couldn't be used in a vdr plugin without breaking the GPL.

	Marko



More information about the vdr mailing list