summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-10-30 15:10:50 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-10-30 15:10:50 +0200
commit664df0902e624904098bad2aacc922c40d26a01c (patch)
tree6c910b2921d6c456d0dadee2d179204f33578d42 /device.c
parentd5018de4feeadc6e5184a1e1dd648f7126e3c0b3 (diff)
downloadvdr-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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/device.c b/device.c
index 5a57faf8..5a750ca0 100644
--- a/device.c
+++ b/device.c
@@ -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++) {