1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Added cDevice::HasCi() so that devices with Common Interface can be avoided when tuning to an FTA channel

This commit is contained in:
Klaus Schmidinger 2007-01-13 12:14:51 +01:00
parent 87dd5139ff
commit 7751b6abb0
7 changed files with 37 additions and 9 deletions

View File

@ -2050,3 +2050,7 @@ J
Peter Pinnau <vdr@unterbrecher.de> Peter Pinnau <vdr@unterbrecher.de>
for reporting that 'uint32_t' requires uncluding stdint.h in font.h on some systems for reporting that 'uint32_t' requires uncluding stdint.h in font.h on some systems
Petri Helin <phelin@googlemail.com>
for suggesting to avoid budget DVB cards with Common Interface when tuning to an
FTA channel

View File

@ -5081,3 +5081,9 @@ Video Disk Recorder Revision History
without valid CA ids VDR can't decide which CAM slot to use. However, since VDR now without valid CA ids VDR can't decide which CAM slot to use. However, since VDR now
automatically determines which CAM can decrypt which channel, setting fixed automatically determines which CAM can decrypt which channel, setting fixed
channel/device relations should no longer be necessary. channel/device relations should no longer be necessary.
2007-01-13: Version 1.5.1
- Added cDevice::HasCi() so that devices with Common Interface can be avoided
when tuning to an FTA channel, thus preserving the CAM resources even on budget
DVB cards (suggested by Petri Helin).

View File

@ -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: config.h 1.283 2007/01/07 14:09:31 kls Exp $ * $Id: config.h 1.284 2007/01/13 11:42:43 kls Exp $
*/ */
#ifndef __CONFIG_H #ifndef __CONFIG_H
@ -21,13 +21,13 @@
// VDR's own version number: // VDR's own version number:
#define VDRVERSION "1.5.0" #define VDRVERSION "1.5.1"
#define VDRVERSNUM 10500 // Version * 10000 + Major * 100 + Minor #define VDRVERSNUM 10501 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number: // The plugin API's version number:
#define APIVERSION "1.5.0" #define APIVERSION "1.5.1"
#define APIVERSNUM 10500 // Version * 10000 + Major * 100 + Minor #define APIVERSNUM 10501 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which // When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to // may be smaller than VDRVERSION in case there have been no changes to

View File

@ -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.138 2007/01/07 14:41:07 kls Exp $ * $Id: device.c 1.139 2007/01/13 12:05:00 kls Exp $
*/ */
#include "device.h" #include "device.h"
@ -334,6 +334,7 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView
imp <<= 8; imp |= min(max((NumUsableSlots ? SlotPriority[j] : 0) + MAXPRIORITY, 0), 0xFF); // use the CAM slot with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used) imp <<= 8; imp |= min(max((NumUsableSlots ? SlotPriority[j] : 0) + MAXPRIORITY, 0), 0xFF); // use the CAM slot with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
imp <<= 1; imp |= ndr; // avoid devices if we need to detach existing receivers imp <<= 1; imp |= ndr; // avoid devices if we need to detach existing receivers
imp <<= 1; imp |= device[i]->IsPrimaryDevice(); // avoid the primary device imp <<= 1; imp |= device[i]->IsPrimaryDevice(); // avoid the primary device
imp <<= 1; imp |= NumUsableSlots ? 0 : device[i]->HasCi(); // avoid cards with Common Interface for FTA channels
imp <<= 1; imp |= device[i]->HasDecoder(); // avoid full featured cards imp <<= 1; imp |= device[i]->HasDecoder(); // avoid full featured cards
imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
if (imp < Impact) { if (imp < Impact) {
@ -367,6 +368,11 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView
return d; return d;
} }
bool cDevice::HasCi(void)
{
return false;
}
void cDevice::SetCamSlot(cCamSlot *CamSlot) void cDevice::SetCamSlot(cCamSlot *CamSlot)
{ {
camSlot = CamSlot; camSlot = CamSlot;

View File

@ -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.h 1.80 2007/01/07 14:38:00 kls Exp $ * $Id: device.h 1.81 2007/01/13 11:33:57 kls Exp $
*/ */
#ifndef __DEVICE_H #ifndef __DEVICE_H
@ -314,6 +314,8 @@ private:
time_t startScrambleDetection; time_t startScrambleDetection;
cCamSlot *camSlot; cCamSlot *camSlot;
public: public:
virtual bool HasCi(void);
///< Returns true if this device has a Common Interface.
void SetCamSlot(cCamSlot *CamSlot); void SetCamSlot(cCamSlot *CamSlot);
///< Sets the given CamSlot to be used with this device. ///< Sets the given CamSlot to be used with this device.
cCamSlot *CamSlot(void) const { return camSlot; } cCamSlot *CamSlot(void) const { return camSlot; }

View File

@ -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: dvbdevice.c 1.161 2007/01/07 14:09:51 kls Exp $ * $Id: dvbdevice.c 1.162 2007/01/13 11:37:00 kls Exp $
*/ */
#include "dvbdevice.h" #include "dvbdevice.h"
@ -509,6 +509,11 @@ cSpuDecoder *cDvbDevice::GetSpuDecoder(void)
return spuDecoder; return spuDecoder;
} }
bool cDvbDevice::HasCi(void)
{
return ciAdapter;
}
uchar *cDvbDevice::GrabImage(int &Size, bool Jpeg, int Quality, int SizeX, int SizeY) uchar *cDvbDevice::GrabImage(int &Size, bool Jpeg, int Quality, int SizeX, int SizeY)
{ {
if (devVideoIndex < 0) if (devVideoIndex < 0)

View File

@ -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: dvbdevice.h 1.42 2007/01/07 14:39:52 kls Exp $ * $Id: dvbdevice.h 1.43 2007/01/13 11:35:07 kls Exp $
*/ */
#ifndef __DVBDEVICE_H #ifndef __DVBDEVICE_H
@ -84,6 +84,11 @@ protected:
protected: protected:
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask); virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
// Common Interface facilities:
public:
virtual bool HasCi(void);
// Image Grab facilities // Image Grab facilities
private: private: