summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-05-18 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-05-18 18:00:00 +0200
commit3bd9a7ccf355e445685ff115464a4e684a8c4211 (patch)
tree8b0a44d0c40e939967c73ec6ebe18776b51c9dcb /eit.c
parentc84022554aaacc9b1c3d9627501cdbb8276871f6 (diff)
downloadvdr-patch-lnbsharing-3bd9a7ccf355e445685ff115464a4e684a8c4211.tar.gz
vdr-patch-lnbsharing-3bd9a7ccf355e445685ff115464a4e684a8c4211.tar.bz2
Version 1.1.32vdr-1.1.32
- Removed a faulty parameter initialization in menu.c (thanks to Lauri Tischler for reporting this one). - Re-implemented the WaitForPut/WaitForGet stuff in cRingBuffer, since some plugins actually need this. By default the buffer does not wait; if a plugin needs the waiting functionality it can call the new SetTimeouts() function. - Moved the call to cPlugin::Start() further up in vdr.c, to make sure it gets called before trying to learn the keys (problem reported by Oliver Endriss). - No longer starting the editing process if no marks have been set (thanks to Matthias Raus for reporting this one). - Added Catalanian language texts (thanks to Marc Rovira Vall and Ramon Roca). Plugin authors may want to add the new entries to their I18N texts and contact the translators to have their texts translated. Note that there are now 16 different OSD languages, so please make sure you have 16 versions for each of your texts. - Moved the detection of a broken video data stream from the cDevice into the cRecorder to avoid problems with cReceivers that want to receive from PIDs that are currently not transmitting (thanks to Marcel Wiesweg for reporting this one). - Fixed setting the locking pid after a timed wait (thanks to Andreas Schultz). - Avoiding spurious section filter settings after a channel switch. - Updated 'channels.conf.cable' (thanks to Stefan Hußfeldt). - Fixed reading 'epg.data' for channels with non-zero RID (thanks to Oliver Endriss for reporting this one). - Fixed EPG bugfix statistics to avoid log entires for undefined channels (thanks to Lars Bläser for reporting this one). - No longer waiting inside cIndexFile::CatchUp() to avoid shortly blocking replay at the end of a recording.
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c43
1 files changed, 29 insertions, 14 deletions
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: