diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-10-30 15:10:50 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-10-30 15:10:50 +0200 |
commit | 664df0902e624904098bad2aacc922c40d26a01c (patch) | |
tree | 6c910b2921d6c456d0dadee2d179204f33578d42 /device.c | |
parent | d5018de4feeadc6e5184a1e1dd648f7126e3c0b3 (diff) | |
download | vdr-664df0902e624904098bad2aacc922c40d26a01c.tar.gz vdr-664df0902e624904098bad2aacc922c40d26a01c.tar.bz2 |
No longer explicitly waiting for a tuner lock when switching channels
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.61 2004/10/23 10:15:31 kls Exp $ + * $Id: device.c 1.62 2004/10/30 14:53:38 kls Exp $ */ #include "device.h" @@ -23,6 +23,7 @@ // The default priority for non-primary devices: #define DEFAULTPRIORITY -1 +#define TUNER_LOCK_TIMEOUT 5000 // ms int cDevice::numDevices = 0; int cDevice::useDevice = 0; @@ -467,7 +468,7 @@ bool cDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) return false; } -bool cDevice::HasLock(void) +bool cDevice::HasLock(int TimeoutMs) { return true; } @@ -765,6 +766,10 @@ bool cDevice::AttachReceiver(cReceiver *Receiver) return false; if (Receiver->device == this) return true; + if (!HasLock(TUNER_LOCK_TIMEOUT)) { + esyslog("ERROR: device %d has no lock, can't attach receiver!", CardIndex() + 1); + return false; + } for (int i = 0; i < MAXRECEIVERS; i++) { if (!receiver[i]) { for (int n = 0; n < MAXRECEIVEPIDS; n++) { |