diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-05-07 15:12:09 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-05-07 15:12:09 +0200 |
commit | f2bb5b34741910aa60b59079b146881eae4f1d00 (patch) | |
tree | 7829fcc8570ae20e7fc9662e5f1efabeb615ed2c | |
parent | 89105812fbc91cc612499b4329637cd1cffd8c85 (diff) | |
download | vdr-f2bb5b34741910aa60b59079b146881eae4f1d00.tar.gz vdr-f2bb5b34741910aa60b59079b146881eae4f1d00.tar.bz2 |
Now preferring budget cards when selecting a DVB device for recording
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | device.c | 16 |
2 files changed, 10 insertions, 7 deletions
@@ -3506,3 +3506,4 @@ Video Disk Recorder Revision History was the only one needing this, doesn't need it any more (thanks to Marco Schlüßler). - No longer retuning or restarting a recording if only the language code of an audio or dolby PID changes. +- Now preferring budget cards when selecting a DVB device for recording. @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.100 2005/05/05 14:48:01 kls Exp $ + * $Id: device.c 1.101 2005/05/07 15:04:17 kls Exp $ */ #include "device.h" @@ -270,7 +270,7 @@ cDevice *cDevice::GetDevice(int Index) cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) { cDevice *d = NULL; - int select = 7, pri; + int select = 8, pri; for (int i = 0; i < numDevices; i++) { bool ndr; @@ -279,16 +279,18 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDe pri = 0; // receiving and allows additional receivers else if (d && !device[i]->Receiving() && 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]->IsPrimaryDevice()) - pri = 2; // free and not the primary device + pri = 3; // free and not the primary device else if (!device[i]->Receiving()) - pri = 3; // free + pri = 4; // free else if (d && device[i]->Priority() < d->Priority()) - pri = 4; // receiving but priority is lower + pri = 5; // receiving but priority is lower else if (d && device[i]->Priority() == d->Priority() && device[i]->ProvidesCa(Channel) < d->ProvidesCa(Channel)) - pri = 5; // receiving with same priority but fewer Ca's + pri = 6; // receiving with same priority but fewer Ca's else - pri = 6; // all others + pri = 7; // all others if (pri < select) { select = pri; d = device[i]; |