mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Now preferring budget cards when selecting a DVB device for recording
This commit is contained in:
parent
89105812fb
commit
f2bb5b3474
1
HISTORY
1
HISTORY
@ -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).
|
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
|
- No longer retuning or restarting a recording if only the language code of an
|
||||||
audio or dolby PID changes.
|
audio or dolby PID changes.
|
||||||
|
- Now preferring budget cards when selecting a DVB device for recording.
|
||||||
|
16
device.c
16
device.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "device.h"
|
||||||
@ -270,7 +270,7 @@ cDevice *cDevice::GetDevice(int Index)
|
|||||||
cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers)
|
cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers)
|
||||||
{
|
{
|
||||||
cDevice *d = NULL;
|
cDevice *d = NULL;
|
||||||
int select = 7, pri;
|
int select = 8, pri;
|
||||||
|
|
||||||
for (int i = 0; i < numDevices; i++) {
|
for (int i = 0; i < numDevices; i++) {
|
||||||
bool ndr;
|
bool ndr;
|
||||||
@ -279,16 +279,18 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDe
|
|||||||
pri = 0; // receiving and allows additional receivers
|
pri = 0; // receiving and allows additional receivers
|
||||||
else if (d && !device[i]->Receiving() && device[i]->ProvidesCa(Channel) < d->ProvidesCa(Channel))
|
else if (d && !device[i]->Receiving() && device[i]->ProvidesCa(Channel) < d->ProvidesCa(Channel))
|
||||||
pri = 1; // free and fewer Ca's
|
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())
|
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())
|
else if (!device[i]->Receiving())
|
||||||
pri = 3; // free
|
pri = 4; // free
|
||||||
else if (d && device[i]->Priority() < d->Priority())
|
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))
|
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
|
else
|
||||||
pri = 6; // all others
|
pri = 7; // all others
|
||||||
if (pri < select) {
|
if (pri < select) {
|
||||||
select = pri;
|
select = pri;
|
||||||
d = device[i];
|
d = device[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user