summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-04-09 10:47:53 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-04-09 10:47:53 +0200
commita6d5d36043358a4d8600a96a23e095130b4c2531 (patch)
tree6d68d4163838872dc51b6ffe26e5c70f72775bb9
parentbfce2b3dba4f4f7f4e6b009b34b2467d3eef6542 (diff)
downloadvdr-a6d5d36043358a4d8600a96a23e095130b4c2531.tar.gz
vdr-a6d5d36043358a4d8600a96a23e095130b4c2531.tar.bz2
Now avoiding the 'actual' device when starting a recording, so that a Transfer Mode for live tv isn't interrupted
-rw-r--r--HISTORY2
-rw-r--r--device.c19
2 files changed, 13 insertions, 8 deletions
diff --git a/HISTORY b/HISTORY
index 1045b404..4ac8b5aa 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4478,3 +4478,5 @@ Video Disk Recorder Revision History
margin.
- Fixed handling VPS timers in case the primary device needs to switch to the
timer's transponder.
+- Now avoiding the 'actual' device when starting a recording, so that a Transfer
+ Mode for live tv isn't interrupted.
diff --git a/device.c b/device.c
index 6b4cc8ae..b931527c 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.126 2006/04/02 13:08:08 kls Exp $
+ * $Id: device.c 1.127 2006/04/09 10:46:36 kls Exp $
*/
#include "device.h"
@@ -281,27 +281,30 @@ cDevice *cDevice::GetDevice(int Index)
cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers)
{
cDevice *d = NULL;
- int select = 8, pri;
+ int select = INT_MAX;
for (int i = 0; i < numDevices; i++) {
bool ndr;
if (device[i]->ProvidesChannel(Channel, Priority, &ndr)) { // this device is basicly able to do the job
+ int pri;
if (device[i]->Receiving() && !ndr)
pri = 0; // receiving and allows additional receivers
- else if (d && !device[i]->Receiving() && device[i]->ProvidesCa(Channel) < d->ProvidesCa(Channel))
+ else if (!device[i]->Receiving(true) && d && device[i]->ProvidesCa(Channel) < d->ProvidesCa(Channel))
pri = 1; // free and fewer Ca's
else if (!device[i]->Receiving() && !device[i]->HasDecoder())
pri = 2; // free and not a full featured card
+ else if (!device[i]->Receiving() && device[i] != ActualDevice())
+ pri = 3; // free and not the actual device
else if (!device[i]->Receiving() && !device[i]->IsPrimaryDevice())
- pri = 3; // free and not the primary device
+ pri = 4; // free and not the primary device
else if (!device[i]->Receiving())
- pri = 4; // free
+ pri = 5; // free
else if (d && device[i]->Priority() < d->Priority())
- pri = 5; // receiving but priority is lower
+ pri = 6; // receiving but priority is lower
else if (d && device[i]->Priority() == d->Priority() && device[i]->ProvidesCa(Channel) < d->ProvidesCa(Channel))
- pri = 6; // receiving with same priority but fewer Ca's
+ pri = 7; // receiving with same priority but fewer Ca's
else
- pri = 7; // all others
+ pri = 8; // all others
if (pri <= select) {
select = pri;
d = device[i];