From 3bd9a7ccf355e445685ff115464a4e684a8c4211 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 18 May 2003 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.1.32=20-=20Removed=20a=20faulty=20parameter?= =?UTF-8?q?=20initialization=20in=20menu.c=20(thanks=20to=20Lauri=20Tischl?= =?UTF-8?q?er=20for=20=20=20reporting=20this=20one).=20-=20Re-implemented?= =?UTF-8?q?=20the=20WaitForPut/WaitForGet=20stuff=20in=20cRingBuffer,=20si?= =?UTF-8?q?nce=20some=20plugins=20=20=20actually=20need=20this.=20By=20def?= =?UTF-8?q?ault=20the=20buffer=20does=20not=20wait;=20if=20a=20plugin=20ne?= =?UTF-8?q?eds=20the=20=20=20waiting=20functionality=20it=20can=20call=20t?= =?UTF-8?q?he=20new=20SetTimeouts()=20function.=20-=20Moved=20the=20call?= =?UTF-8?q?=20to=20cPlugin::Start()=20further=20up=20in=20vdr.c,=20to=20ma?= =?UTF-8?q?ke=20sure=20it=20gets=20=20=20called=20before=20trying=20to=20l?= =?UTF-8?q?earn=20the=20keys=20(problem=20reported=20by=20Oliver=20Endriss?= =?UTF-8?q?).=20-=20No=20longer=20starting=20the=20editing=20process=20if?= =?UTF-8?q?=20no=20marks=20have=20been=20set=20(thanks=20to=20=20=20Matthi?= =?UTF-8?q?as=20Raus=20for=20reporting=20this=20one).=20-=20Added=20Catala?= =?UTF-8?q?nian=20language=20texts=20(thanks=20to=20Marc=20Rovira=20Vall?= =?UTF-8?q?=20and=20Ramon=20Roca).=20=20=20Plugin=20authors=20may=20want?= =?UTF-8?q?=20to=20add=20the=20new=20entries=20to=20their=20I18N=20texts?= =?UTF-8?q?=20and=20contact=20=20=20the=20translators=20to=20have=20their?= =?UTF-8?q?=20texts=20translated.=20Note=20that=20there=20are=20now=2016?= =?UTF-8?q?=20=20=20different=20OSD=20languages,=20so=20please=20make=20su?= =?UTF-8?q?re=20you=20have=2016=20versions=20for=20each=20of=20=20=20your?= =?UTF-8?q?=20texts.=20-=20Moved=20the=20detection=20of=20a=20broken=20vid?= =?UTF-8?q?eo=20data=20stream=20from=20the=20cDevice=20into=20the=20=20=20?= =?UTF-8?q?cRecorder=20to=20avoid=20problems=20with=20cReceivers=20that=20?= =?UTF-8?q?want=20to=20receive=20from=20PIDs=20=20=20that=20are=20currentl?= =?UTF-8?q?y=20not=20transmitting=20(thanks=20to=20Marcel=20Wiesweg=20for?= =?UTF-8?q?=20reporting=20=20=20this=20one).=20-=20Fixed=20setting=20the?= =?UTF-8?q?=20locking=20pid=20after=20a=20timed=20wait=20(thanks=20to=20An?= =?UTF-8?q?dreas=20Schultz).=20-=20Avoiding=20spurious=20section=20filter?= =?UTF-8?q?=20settings=20after=20a=20channel=20switch.=20-=20Updated=20'ch?= =?UTF-8?q?annels.conf.cable'=20(thanks=20to=20Stefan=20Hu=C3=9Ffeldt).=20?= =?UTF-8?q?-=20Fixed=20reading=20'epg.data'=20for=20channels=20with=20non-?= =?UTF-8?q?zero=20RID=20(thanks=20to=20Oliver=20=20=20Endriss=20for=20repo?= =?UTF-8?q?rting=20this=20one).=20-=20Fixed=20EPG=20bugfix=20statistics=20?= =?UTF-8?q?to=20avoid=20log=20entires=20for=20undefined=20channels=20(than?= =?UTF-8?q?ks=20=20=20to=20Lars=20Bl=C3=A4ser=20for=20reporting=20this=20o?= =?UTF-8?q?ne).=20-=20No=20longer=20waiting=20inside=20cIndexFile::CatchUp?= =?UTF-8?q?()=20to=20avoid=20shortly=20blocking=20replay=20=20=20at=20the?= =?UTF-8?q?=20end=20of=20a=20recording.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eit.c | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) (limited to 'eit.c') diff --git a/eit.c b/eit.c index 76da266..a5b14e7 100644 --- a/eit.c +++ b/eit.c @@ -16,7 +16,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: eit.c 1.75 2003/05/11 11:25:04 kls Exp $ + * $Id: eit.c 1.78 2003/05/18 14:10:25 kls Exp $ ***************************************************************************/ #include "eit.h" @@ -434,27 +434,33 @@ static void ReportEpgBugFixStats(bool Reset = false) const char *delim = "\t"; tEpgBugFixStats *p = &EpgBugFixStats[i]; if (p->hits) { - if (!GotHits) { - dsyslog("====================="); - dsyslog("EPG bugfix statistics"); - dsyslog("====================="); - dsyslog("IF SOMEBODY WHO IS IN CHARGE OF THE EPG DATA FOR ONE OF THE LISTED"); - dsyslog("CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEventInfo::FixEpgBugs()"); - dsyslog("IN VDR/eit.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!"); - dsyslog("====================="); - dsyslog("Fix\tHits\tChannels"); - GotHits = true; - } + bool PrintedStats = false; char *q = buffer; - q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits); + *buffer = 0; for (int c = 0; c < p->n; c++) { cChannel *channel = Channels.GetByChannelID(p->channelIDs[c], true); if (channel) { + if (!GotHits) { + dsyslog("====================="); + dsyslog("EPG bugfix statistics"); + dsyslog("====================="); + dsyslog("IF SOMEBODY WHO IS IN CHARGE OF THE EPG DATA FOR ONE OF THE LISTED"); + dsyslog("CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEventInfo::FixEpgBugs()"); + dsyslog("IN VDR/eit.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!"); + dsyslog("====================="); + dsyslog("Fix\tHits\tChannels"); + GotHits = true; + } + if (!PrintedStats) { + q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits); + PrintedStats = true; + } q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->Name()); delim = ", "; } } - dsyslog("%s", buffer); + if (*buffer) + dsyslog("%s", buffer); } if (Reset) p->hits = p->n = 0; @@ -807,6 +813,7 @@ cSchedules::~cSchedules() /** */ const cSchedule *cSchedules::AddChannelID(tChannelID channelid) { + channelid.ClrRid(); const cSchedule *p = GetSchedule(channelid); if (!p) { Add(new cSchedule(channelid)); @@ -1073,6 +1080,7 @@ cSIProcessor::cSIProcessor(const char *FileName) masterSIProcessor = numSIProcessors == 0; // the first one becomes the 'master' currentSource = 0; currentTransponder = 0; + statusCount = 0; pmtIndex = 0; pmtPid = 0; filters = NULL; @@ -1150,6 +1158,7 @@ const char *cSIProcessor::GetEpgDataFileName(void) void cSIProcessor::SetStatus(bool On) { LOCK_THREAD; + statusCount++; ShutDownFilters(); pmtIndex = 0; pmtPid = 0; @@ -1176,6 +1185,7 @@ void cSIProcessor::Action() time_t lastCleanup = time(NULL); time_t lastPmtScan = time(NULL); + int oldStatusCount = 0; active = true; while(active) @@ -1208,6 +1218,7 @@ void cSIProcessor::Action() } // set up pfd structures for all active filter + Lock(); pollfd pfd[MAX_FILTERS]; int NumUsedFilters = 0; for (int a = 0; a < MAX_FILTERS ; a++) @@ -1219,6 +1230,8 @@ void cSIProcessor::Action() NumUsedFilters++; } } + oldStatusCount = statusCount; + Unlock(); // wait until data becomes ready from the bitfilter if (poll(pfd, NumUsedFilters, 1000) != 0) @@ -1239,6 +1252,8 @@ void cSIProcessor::Action() //dsyslog("Received pid 0x%04X with table ID 0x%02X and length of %4d\n", pid, buf[0], seclen); cMutexLock MutexLock(&schedulesMutex); // since the xMem... stuff is not thread safe, we need to use a "global" mutex LOCK_THREAD; + if (statusCount != oldStatusCount) + break; switch (pid) { case 0x00: -- cgit v1.2.3