summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Steinhaus <hsteinhaus@gmx.de>2015-11-12 11:05:05 +0100
committerHolger Steinhaus <hsteinhaus@gmx.de>2015-11-17 12:51:31 +0100
commit23f2217e765e14ad2c2a4192d8c57839d657ac6b (patch)
tree49cdff4acecf9fdba409f207c159069631f44f79
parente4ed62f8a9a3bf45932bce845d4c1f888bed121c (diff)
downloadvdr-plugin-mcli-23f2217e765e14ad2c2a4192d8c57839d657ac6b.tar.gz
vdr-plugin-mcli-23f2217e765e14ad2c2a4192d8c57839d657ac6b.tar.bz2
do not try any CAM steal voodoo if not at least one CAM is present.
This change resolves the nasty "retrying" message generated by VDR's cDevice::SwitchChannel()
-rw-r--r--device.c3
-rw-r--r--mcli.c5
-rw-r--r--mcli.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/device.c b/device.c
index 92405dc..e47014c 100644
--- a/device.c
+++ b/device.c
@@ -538,10 +538,11 @@ bool cMcliDevice::SetChannelDevice (const cChannel * Channel, bool LiveView)
} else {
m_disabletimeout = TEMP_DISABLE_TIMEOUT_DEFAULT;
}
- bool cam_force=true;
+ bool cam_force = m_mcli && m_mcli->CAMPresent() && LiveView;
if(cam_force && !CheckCAM(Channel, true)) {
#ifdef DEBUG_TUNE
dsyslog("Mcli::%s: No CAM on DVB %d available even after tried to steal one\n", __FUNCTION__, CardIndex () + 1);
+ dsyslog("CAMPresent: %d\n", m_mcli->CAMPresent());
#endif
return false;
}
diff --git a/mcli.c b/mcli.c
index 1455e1c..c29b2c7 100644
--- a/mcli.c
+++ b/mcli.c
@@ -122,6 +122,7 @@ cPluginMcli::cPluginMcli (void)
m_recv_init_done = 0;
m_mld_init_done = 0;
m_api_init_done = 0;
+ m_cam_present = false;
memset (m_cam_pool, 0, sizeof (cam_pool_t) * CAM_POOL_MAX);
for(i=0; i<CAM_POOL_MAX; i++) {
m_cam_pool[i].max = -1;
@@ -327,9 +328,13 @@ int cPluginMcli::CAMPoolAdd(netceiver_info_t *nci)
switch (nci->cam[j].flags) {
case CA_SINGLE:
case CA_MULTI_SID:
+ m_cam_present = true;
+ dsyslog("Found CAM");
cp->max = 1;
break;
case CA_MULTI_TRANSPONDER:
+ dsyslog("Found CAM");
+ m_cam_present = true;
cp->max = nci->cam[j].max_sids;
break;
}
diff --git a/mcli.h b/mcli.h
index a62fffe..36efb68 100644
--- a/mcli.h
+++ b/mcli.h
@@ -96,6 +96,7 @@ class cPluginMcli:public cPlugin, public cThread
int m_recv_init_done;
int m_mld_init_done;
int m_api_init_done;
+ bool m_cam_present;
tuner_pool_t m_tuner_pool[TUNER_POOL_MAX];
tuner_pool_t *TunerAvailableInt(fe_type_t type, int pos);
@@ -158,6 +159,7 @@ class cPluginMcli:public cPlugin, public cThread
cam_pool_t *CAMAlloc (const char *uuid=NULL, int slot=-1);
int CAMFree (cam_pool_t *cp);
bool CAMSteal(const char *uuid=NULL, int slot=-1, bool force=false);
+ bool CAMPresent() { return m_cam_present; }
satellite_list_t *TunerFindSatList(const netceiver_info_t *nc_info, const char *SatelliteListName) const;
bool SatelitePositionLookup(const satellite_list_t *satlist, int pos) const;