diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-23 13:19:10 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-23 13:19:10 +0100 |
commit | edfe5829417bea8879bd2e45892b4465ea69b6eb (patch) | |
tree | fc4b20198c794682d0197e2e8b065d48198fd319 /device.c | |
parent | 1b1267674f2b1d632097e60f1284f6ba97b10e00 (diff) | |
download | vdr-edfe5829417bea8879bd2e45892b4465ea69b6eb.tar.gz vdr-edfe5829417bea8879bd2e45892b4465ea69b6eb.tar.bz2 |
Attempting to stay on the current channel in case of an upcoming recording
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 7 |
1 files changed, 6 insertions, 1 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.154 2008/02/17 15:55:06 kls Exp $ + * $Id: device.c 1.155 2008/02/23 13:09:01 kls Exp $ */ #include "device.h" @@ -218,6 +218,7 @@ int cDevice::nextCardIndex = 0; int cDevice::currentChannel = 1; cDevice *cDevice::device[MAXDEVICES] = { NULL }; cDevice *cDevice::primaryDevice = NULL; +cDevice *cDevice::avoidDevice = NULL; cDevice::cDevice(void) { @@ -356,6 +357,8 @@ cDevice *cDevice::GetDevice(int Index) cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView) { + cDevice *AvoidDevice = avoidDevice; + avoidDevice = NULL; // Collect the current priorities of all CAM slots that can decrypt the channel: int NumCamSlots = CamSlots.Count(); int SlotPriority[NumCamSlots]; @@ -385,6 +388,8 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView if (NumUsableSlots && SlotPriority[j] > MAXPRIORITY) continue; // there is no CAM available in this slot for (int i = 0; i < numDevices; i++) { + if (device[i] == AvoidDevice) + continue; // this device shall be temporarily avoided if (Channel->Ca() && Channel->Ca() <= CA_DVB_MAX && Channel->Ca() != device[i]->CardIndex() + 1) continue; // a specific card was requested, but not this one if (NumUsableSlots && !CamSlots.Get(j)->Assign(device[i], true)) |