]> www.vanbest.org Git - sasc-ng.git/commitdiff
fix detecting FullTS mode on HD device
authorleslie <unknown>
Sun, 4 Sep 2011 03:11:46 +0000 (11:11 +0800)
committerleslie <unknown>
Sun, 4 Sep 2011 03:11:46 +0000 (11:11 +0800)
device-hd.c
device-sd.c
device-tmpl.c
device.c

index 3469a8cdd9c98acc5da91ad1c43c01b501ede8de..bc139969e094955c001e0f6af29ed94d460d5f34 100644 (file)
@@ -45,9 +45,6 @@ SCAPIVERSTAG();
 #define DVBDEVICE cDvbHdFfDevice
 #define OWN_SETCA
 #include "device-tmpl.c"
-#undef SCDEVICE
-#undef DVBDEVICE
-#undef OWN_SETCA
 
 bool cScDvbHdFfDevice::SetCaDescr(ca_descr_t *ca_descr, bool initial)
 {
index 9d6190f36c46e2b0726e235e3fee231060017896..3adfa48e67693fc59805026c49df1fae23c28d93 100644 (file)
@@ -43,13 +43,15 @@ SCAPIVERSTAG();
 #include "../dvbsddevice/dvbsdffdevice.h"
 #define SCDEVICE cScDvbSdFfDevice
 #define DVBDEVICE cDvbSdFfDevice
+#define OWN_FULLTS
 #define OWN_SETCA
 #define OWN_DUMPAV
 #include "device-tmpl.c"
-#undef SCDEVICE
-#undef DVBDEVICE
-#undef OWN_SETCA
-#undef OWN_DUMPAV
+
+bool cScDvbSdFfDevice::CheckFullTs(void)
+{
+  return IsPrimaryDevice() && HasDecoder();
+}
 
 bool cScDvbSdFfDevice::SetCaDescr(ca_descr_t *ca_descr, bool initial)
 {
index adac307a9389fb31affbb6ecca30e2e60d4a5cc2..9e8493666535186f78a2ebd7e31d1caa8b7cccd1 100644 (file)
@@ -58,6 +58,7 @@ public:
   virtual bool HasCi(void);
   void LateInit(void);
   void EarlyShutdown(void);
+  bool CheckFullTs(void);
 #else
   cCam *Cam(void) { return cam; }
 #endif //!SASC
@@ -125,6 +126,13 @@ void SCDEVICE::EarlyShutdown(void)
   delete hwciadapter; hwciadapter=0;
 }
 
+#ifndef OWN_FULLTS
+bool SCDEVICE::CheckFullTs(void)
+{
+  return false;
+}
+#endif //!OWN_FULLTS
+
 void SCDEVICE::LateInit(void)
 {
   int n=CardIndex();
@@ -139,10 +147,8 @@ void SCDEVICE::LateInit(void)
     softcsa=true;
     }
   if(softcsa) {
-    if(IsPrimaryDevice() && HasDecoder()) {
-      PRINTF(L_GEN_INFO,"Enabling hybrid full-ts mode on card %s",devId);
-      fullts=true;
-      }
+    fullts=CheckFullTs();
+    if(fullts) PRINTF(L_GEN_INFO,"Enabling hybrid full-ts mode on card %s",devId);
     else PRINTF(L_GEN_INFO,"Using software decryption on card %s",devId);
     }
   if(fd_ca2>=0) hwciadapter=cDvbCiAdapter::CreateCiAdapter(this,fd_ca2);
@@ -210,3 +216,9 @@ bool SCDEVICE::GetTSPacket(uchar *&Data)
 }
 
 #endif // !SASC
+
+#undef SCDEVICE
+#undef DVBDEVICE
+#undef OWN_SETCA
+#undef OWN_DUMPAV
+#undef OWN_FULLTS
index b1cc01f06aa7bd20968630b8813ddc4c253ec995..2d7eac3f6582fae3ab4f102a3243b71d765b698a 100644 (file)
--- a/device.c
+++ b/device.c
@@ -144,14 +144,17 @@ cScDevicePlugin::~cScDevicePlugin()
 #define SCDEVICE cScDvbDevice
 #define DVBDEVICE cDvbDevice
 #if APIVERSNUM < 10711
+#define OWN_FULLTS
 #define OWN_SETCA
 #endif
 #include "device-tmpl.c"
-#undef SCDEVICE
-#undef DVBDEVICE
-#undef OWN_SETCA
 
 #if APIVERSNUM < 10711
+bool cScDvbDevice::CheckFullTs(void)
+{
+  return IsPrimaryDevice() && HasDecoder();
+}
+
 bool cScDvbDevice::SetCaDescr(ca_descr_t *ca_descr, bool initial)
 {
   cMutexLock lock(&cafdMutex);