diff options
-rw-r--r-- | HISTORY | 7 | ||||
-rw-r--r-- | device.c | 4 | ||||
-rw-r--r-- | filter.c | 4 | ||||
-rw-r--r-- | mcli.c | 32 | ||||
-rw-r--r-- | mcli.h | 4 |
5 files changed, 41 insertions, 10 deletions
@@ -1,6 +1,13 @@ VDR Plugin 'mcli' Revision History ---------------------------------- +2015-11-12 +- hsteinhaus debugged makefiles to ensure complete compilation, even when using parallel make jobs +- hsteinhaus consolidated debug logging and disabled it by default +- hsteinhaus check if CAM is present before enforcing it's use +- hsteinhaus resolved some compiler warnings +- hsteinhaus removed some unused headers + 2014-07-12 - mhorwath debug 2.1.x issue http://projects.vdr-developer.org/issues/1709 , little message cleanup, added cam info at startup, fixed compile warning @@ -87,7 +87,9 @@ cMcliDevice::cMcliDevice (void) m_camref = NULL; InitMcli (); +#ifdef DEBUG_RESOURCES dsyslog ("Mcli::%s: DVB got device number %d\n", __FUNCTION__, CardIndex () + 1); +#endif } @@ -95,7 +97,9 @@ cMcliDevice::~cMcliDevice () { LOCK_THREAD; StopSectionHandler (); +#ifdef DEBUG_RESOURCES dsyslog ("Mcli::%s: DVB %d gets destructed\n", __FUNCTION__, CardIndex () + 1); +#endif Cancel (0); m_locked.Broadcast (); ExitMcli (); @@ -160,7 +160,9 @@ bool cMcliFilter::PutSection (const uchar * Data, int Length, bool Pusi) } if (m_Used > length) { +#ifdef DEBUG_FILTER dsyslog ("cMcliFilter::PutSection: m_Used > length ! Pid %2d, Tid%2d " "(len %3d, got %d/%d)", m_Pid, m_Tid, Length, m_Used, length); +#endif if (Length < TS_SIZE - 5) { // TS packet not full -> this must be last TS packet of section data -> safe to reset now Reset (); @@ -428,7 +430,9 @@ void cMcliFilters::Action (void) } } DELETENULL (m_PB); +#ifdef DEBUG_FILTER dsyslog ("McliFilters::Action() ended"); +#endif } void cMcliFilters::ProcessChunk(u_short pid, const uchar *block, int len, bool Pusi) { @@ -74,11 +74,13 @@ cOsdObject *cPluginMcli::AltMenuAction (void) for (cMcliDeviceObject * dev = m_devs.First (); dev; dev = m_devs.Next (dev)) { cMcliDevice *d = dev->d (); +#ifdef DEBUG_TUNE dsyslog("satpos: %i vpid: %i fep.freq: %i\n", satpos, vpid, fep.frequency); +#endif struct in6_addr mcg = d->GetTenData ()->mcg; mcg_set_id (&mcg, 0); -#if 1 //def DEBUG +#ifdef DEBUG_TUNE char str[INET6_ADDRSTRLEN]; inet_ntop (AF_INET6, &c->mcg, str, INET6_ADDRSTRLEN); dsyslog ("MCG from MMI: %s\n", str); @@ -89,7 +91,9 @@ cOsdObject *cPluginMcli::AltMenuAction (void) if (IN6_IS_ADDR_UNSPECIFIED (&c->mcg) || !memcmp (&c->mcg, &mcg, sizeof (struct in6_addr))) return new cCamMenu (&m_cmd, &m); } - isyslog ("SID/Program Number:%04x, SatPos:%d Freqency:%d\n", c->caid, satpos, fep.frequency); +#ifdef DEBUG_TUNE + dsyslog ("SID/Program Number:%04x, SatPos:%d Freqency:%d\n", c->caid, satpos, fep.frequency); +#endif } if (m.caid_num && m.caids) { free (m.caids); @@ -329,11 +333,15 @@ int cPluginMcli::CAMPoolAdd(netceiver_info_t *nci) case CA_SINGLE: case CA_MULTI_SID: m_cam_present = true; +#ifdef DEBUG_RESOURCES dsyslog("Found CAM"); +#endif cp->max = 1; break; case CA_MULTI_TRANSPONDER: +#ifdef DEBUG_RESOURCES dsyslog("Found CAM"); +#endif m_cam_present = true; cp->max = nci->cam[j].max_sids; break; @@ -609,9 +617,9 @@ tuner_pool_t *cPluginMcli::TunerAvailable(fe_type_t type, int pos, bool lock) if(lock) { Lock(); } - - isyslog("Mcli::%s: Testing for tuner type %d pos %d\n", __FUNCTION__, type, pos); - +#ifdef DEBUG_RESOURCES + dyslog("Mcli::%s: Testing for tuner type %d pos %d\n", __FUNCTION__, type, pos); +#endif if (TunerCountByType (type) == m_cmd.tuner_type_limit[type]) { #ifdef DEBUG_RESOURCES @@ -640,7 +648,9 @@ tuner_pool_t *cPluginMcli::TunerAvailable(fe_type_t type, int pos, bool lock) if(lock) { Unlock(); } - isyslog("Mcli::%s: Tuner %d(%p) available\n", __FUNCTION__, i, tp); +#ifdef DEBUG_RESOURCES + dsyslog("Mcli::%s: Tuner %d(%p) available\n", __FUNCTION__, i, tp); +#endif return tp; } @@ -766,12 +776,14 @@ void cPluginMcli::Action (void) case CA_MULTI_TRANSPONDER: cammode="CA_MULTI_TRANSPONDER"; break; } +#ifdef DEBUG_RESOURCES if (nci->cam[j].status != DVBCA_CAMSTATE_MISSING) { - isyslog("Mcli::%s: Slot:%d CamModule '%s' State:%s Mode:%s\n", __FUNCTION__, j, nci->cam[j].menu_string, camstate, cammode); + dsyslog("Mcli::%s: Slot:%d CamModule '%s' State:%s Mode:%s\n", __FUNCTION__, j, nci->cam[j].menu_string, camstate, cammode); } else { - isyslog("Mcli::%s: Slot:%d CamModule State:%s\n", __FUNCTION__, j, camstate); + dsyslog("Mcli::%s: Slot:%d CamModule State:%s\n", __FUNCTION__, j, camstate); } +#endif } } @@ -837,7 +849,9 @@ void cPluginMcli::Action (void) if (!channel_switch_ok) { // the first tuner that was found, so make VDR retune to the channel it wants... cChannel *ch = Channels.GetByNumber (cDevice::CurrentChannel ()); if (ch) { +#ifdef DEBUG_TUNE dsyslog("Mcli::%s: cDevice::PrimaryDevice (%p)\n", __FUNCTION__, cDevice::PrimaryDevice ()); +#endif channel_switch_ok = cDevice::PrimaryDevice ()->SwitchChannel (ch, true); } } @@ -1009,7 +1023,9 @@ bool cPluginMcli::Service (const char *Id, void *Data) strcpy (infos->name[j], nci->tuner[i].fe_info.name); infos->type[j] = nci->tuner[i].fe_info.type; infos->preference[j++] = nci->tuner[i].preference; +#ifdef DEBUG_TUNE dsyslog("Mcli::%s: Tuner: %s\n", __FUNCTION__, nci->tuner[i].fe_info.name); +#endif } } nc_unlock_list (); @@ -37,8 +37,8 @@ //#define DEBUG_PIDS //#define DEBUG_TUNE_EXTRA -#define DEBUG_TUNE -#define DEBUG_RESOURCES +//#define DEBUG_TUNE +//#define DEBUG_RESOURCES class cMcliDeviceObject:public cListObject { |