[vdr] VDR needs some way to detect new tuners on runtime...

Manuel Reimer manuel.reimer at gmx.de
Tue Aug 20 10:20:24 CEST 2013


On 08/20/2013 10:12 AM, Klaus Schmidinger wrote:
>> So my question to Klaus: Is there something like this planned or would
>> a patch be accepted which adds a feature like this? As far as I know a
>> new dependency (libudev) would be needed.
>
> I wouldn't like to add a dependency to libudev.

So how could an alternative approach look like? Maybe it could work with 
"inotify" to see when new devices are added below /dev, but I think this 
will also require new dependencies.

The easiest way may be: Call the existing code for finding the tuners 
not only once but every X seconds.

>    NUMADAPTERS=3
>    while [[ `find /dev/dvb -name 'adapter*' | wc -l` -lt $NUMADAPTERS
> ]]; do sleep 1; done
>    runvdr ...
>
> could be used to count the number of adapters, and check that number in
> a loop
> against the expected number of adapters.

This works for *one* system and only if the user manually sets the 
number of adapters. How could this be done in a "automagic" way to allow 
users to just plug the tuner and reboot?

Yours

Manuel



More information about the vdr mailing list