[ANNOUNCE] VDR developer version 1.5.0
Commit Message
Petri Helin wrote:
> ...
> BTW: I have been patching the device.c in 1.4.* series so that my other
> card, TT budget DVB-C v1.0, is always preferred for FTA channel
> recordings. Otherwise the precious CAM could be wasted in an FTA
> recording. I understood that you are planning on restructuring the
> priority model in 1.5.*. Have you taken in consideration the situation
> with budget-only environment with one or more CIs?
Please try the attached patch and let me know if it works
as expected.
Klaus
===================================================================
RCS file: RCS/device.c
retrieving revision 1.138
@@ -334,6 +334,7 @@
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 |= 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 |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
if (imp < Impact) {
@@ -367,6 +368,11 @@
return d;
}
+bool cDevice::HasCi(void)
+{
+ return false;
+}
+
void cDevice::SetCamSlot(cCamSlot *CamSlot)
{
camSlot = CamSlot;
===================================================================
RCS file: RCS/device.h
retrieving revision 1.80
@@ -314,6 +314,8 @@
time_t startScrambleDetection;
cCamSlot *camSlot;
public:
+ virtual bool HasCi(void);
+ ///< Returns true if this device has a Common Interface.
void SetCamSlot(cCamSlot *CamSlot);
///< Sets the given CamSlot to be used with this device.
cCamSlot *CamSlot(void) const { return camSlot; }
===================================================================
RCS file: RCS/dvbdevice.c
retrieving revision 1.161
@@ -509,6 +509,11 @@
return spuDecoder;
}
+bool cDvbDevice::HasCi(void)
+{
+ return ciAdapter;
+}
+
uchar *cDvbDevice::GrabImage(int &Size, bool Jpeg, int Quality, int SizeX, int SizeY)
{
if (devVideoIndex < 0)
===================================================================
RCS file: RCS/dvbdevice.h
retrieving revision 1.42
@@ -84,6 +84,11 @@
protected:
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
+// Common Interface facilities:
+
+public:
+ virtual bool HasCi(void);
+
// Image Grab facilities
private: