mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed checking the Ca() status of a cDevice
This commit is contained in:
parent
01ad12975c
commit
2c311093ba
@ -154,6 +154,7 @@ Stefan Huelswitt <huels@iname.com>
|
||||
be switched or has actually been switched successfully
|
||||
for adding a missing StripAudioPackets() to cDvbPlayer::Action()
|
||||
for improving skipping channels that are (currently) not available
|
||||
for fixing checking the Ca() status of a cDevice
|
||||
|
||||
Ulrich Röder <roeder@efr-net.de>
|
||||
for pointing out that there are channels that have a symbol rate higher than
|
||||
|
1
HISTORY
1
HISTORY
@ -1633,3 +1633,4 @@ Video Disk Recorder Revision History
|
||||
now be given either in MHz, kHz or Hz. The actual value given will be multiplied
|
||||
by 1000 until it is larger than 1000000.
|
||||
- Fixed skipping unavailable channels when zapping downwards.
|
||||
- Fixed checking the Ca() status of a cDevice (thanks to Stefan Huelswitt).
|
||||
|
13
device.c
13
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.29 2002/10/20 16:05:51 kls Exp $
|
||||
* $Id: device.c 1.30 2002/10/26 09:43:11 kls Exp $
|
||||
*/
|
||||
|
||||
#include "device.h"
|
||||
@ -52,7 +52,6 @@ cDevice::cDevice(void)
|
||||
|
||||
for (int i = 0; i < MAXRECEIVERS; i++)
|
||||
receiver[i] = NULL;
|
||||
ca = -1;
|
||||
|
||||
if (numDevices < MAXDEVICES) {
|
||||
device[numDevices++] = this;
|
||||
@ -531,6 +530,16 @@ int cDevice::PlayAudio(const uchar *Data, int Length)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int cDevice::Ca(void) const
|
||||
{
|
||||
int ca = 0;
|
||||
for (int i = 0; i < MAXRECEIVERS; i++) {
|
||||
if (receiver[i] && (ca = receiver[i]->ca) != 0)
|
||||
break; // all receivers have the same ca
|
||||
}
|
||||
return ca;
|
||||
}
|
||||
|
||||
int cDevice::Priority(void) const
|
||||
{
|
||||
int priority = IsPrimaryDevice() ? Setup.PrimaryLimit - 1 : DEFAULTPRIORITY;
|
||||
|
7
device.h
7
device.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: device.h 1.23 2002/10/12 11:15:13 kls Exp $
|
||||
* $Id: device.h 1.24 2002/10/26 09:35:20 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __DEVICE_H
|
||||
@ -324,7 +324,6 @@ public:
|
||||
|
||||
private:
|
||||
cReceiver *receiver[MAXRECEIVERS];
|
||||
int ca;
|
||||
int CanShift(int Ca, int Priority, int UsedCards = 0) const;
|
||||
protected:
|
||||
int Priority(void) const;
|
||||
@ -344,8 +343,8 @@ protected:
|
||||
// false in case of a non recoverable error, otherwise it returns true,
|
||||
// even if Data is NULL.
|
||||
public:
|
||||
int Ca(void) const { return ca; }
|
||||
// Returns the ca of the current receiving session.
|
||||
int Ca(void) const;
|
||||
// Returns the ca of the current receiving session(s).
|
||||
bool Receiving(void) const;
|
||||
// Returns true if we are currently receiving.
|
||||
bool AttachReceiver(cReceiver *Receiver);
|
||||
|
Loading…
Reference in New Issue
Block a user