Re: sparse DVB adapter numbers

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

 



On 21.03.2009 14:17, Artur Skawina wrote:
> Patrick Rother wrote:
>> For a reason not to go in details too much here, I would like to make
>> vdr recognise sparse DVB adapter numbers.
>>
>> I have:
>>
>> root@vdr:/dev/dvb# ls -l
>> total 0
>> drwxr-xr-x 2 root root 200 Mar 19 11:59 adapter0/
>> drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter1/
>> drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter5/
>> drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter6/
>> drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter7/
>> root@vdr:/dev/dvb# 
>>
>> But vdr uses only the first two devices.
>>
>> Is there any easy possibility to patch the code accordingly?
> 
> ./vdr -D 0 -D 1 -D 5 -D 6 -D 7

I'm afraid this won't work, because VDR stops scaning for DVB devices
as soon as it hits a gap.

You might want to try changing this function:

bool cDvbDevice::Initialize(void)
{
  int found = 0;
  int i;
  for (i = 0; i < MAXDVBDEVICES; i++) {
      if (UseDevice(NextCardIndex())) {
         if (Probe(*cDvbName(DEV_DVB_FRONTEND, i))) {
            new cDvbDevice(i);
            found++;
            }
         else
            NextCardIndex(1); // skips this one  <=========== changed line
         }
      else
         NextCardIndex(1); // skips this one
      }
  NextCardIndex(MAXDVBDEVICES - i); // skips the rest
  if (found > 0)
     isyslog("found %d video device%s", found, found > 1 ? "s" : "");
  else
     isyslog("no DVB device found");
  return found > 0;
}

Untested, don't know if it will actually work as expected.

Klaus

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux