summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-03-14 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-03-14 18:00:00 +0100
commit9384e56566f56e77d577319a42929e708936e7c7 (patch)
tree594b86bcda612612b342c667966c678394a322fc /eit.c
parent5a4eb3f1041b8a53826cebe570f9d201f3d35826 (diff)
downloadvdr-patch-lnbsharing-9384e56566f56e77d577319a42929e708936e7c7.tar.gz
vdr-patch-lnbsharing-9384e56566f56e77d577319a42929e708936e7c7.tar.bz2
Version 1.3.6vdr-1.3.6
- Completed the Finnish OSD texts (thanks to Rolf Ahrenberg). - Fixed some descriptor handling in 'libsi' (thanks to Stéphane Esté-Gracias). - Fixed handling the current menu item (thanks to Marc Hoppe). - Fixed assigning events to timers (they no longer get "stuck"). - Added log entries whenever the running status of an event changes (currently only logging the first 30 channels). - Fixed handling timers in VPS margin if the EPG scan is turned on (the EPG scan switched the device away from the channel, so it wouldn't see the change of the running status). - Fixed handling "itemized" texts in EPG data (thanks to Stéphane Esté-Gracias for pointing out this problem, and Marcel Wiesweg for improving 'libsi'). - Fixed handling VPS times at year boundaries. - Avoiding too many consecutive "ring buffer overflow" messages (which only slowed down performance even more). - Taking the Sid into account when detecting version changes in processing the PMT (thanks to Stéphane Esté-Gracias for pointing out this problem). - Completed the Russian OSD texts (thanks to Vyacheslav Dikonov). - Any newline characters in the 'description' of EPG events are now preserved to allow texts to be displayed the way the tv stations have formatted them. This was also necessary to better display itemized texts. - Fixed detecting the running status in case an empty EPG event is broadcast (thanks to Michael Pennewiß for pointing this out). - Improved performance when paging through very long menu lists. - Removed cSchedule::GetEventNumber() and cSchedule::NumEvents(). There is now cSchedule::Events() that returns the list of events directly. - Avoiding occasional bad responsiveness to user interaction caused by assigning events to timers. - Now explicitly turning on the LNB power at startup, because newer drivers don't do this any more (thanks to Oliver Endriss for pointing this out).
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/eit.c b/eit.c
index 85f051e..a426477 100644
--- a/eit.c
+++ b/eit.c
@@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
*
- * $Id: eit.c 1.89 2004/02/22 13:17:52 kls Exp kls $
+ * $Id: eit.c 1.93 2004/03/13 13:54:20 kls Exp $
*/
#include "eit.h"
@@ -43,10 +43,12 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
Schedules->Add(pSchedule);
}
+ bool Empty = true;
bool Modified = false;
SI::EIT::Event SiEitEvent;
for (SI::Loop::Iterator it; eventLoop.hasNext(it); ) {
+ Empty = false;
SiEitEvent = eventLoop.getNext(it);
cEvent *pEvent = (cEvent *)pSchedule->GetEvent(SiEitEvent.getEventId(), SiEitEvent.getStartTime());
@@ -82,10 +84,6 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
pEvent->SetVersion(getVersionNumber());
pEvent->SetStartTime(SiEitEvent.getStartTime());
pEvent->SetDuration(SiEitEvent.getDuration());
- if (isPresentFollowing()) {
- if (SiEitEvent.getRunningStatus() > SI::RunningStatusNotRunning)
- pSchedule->SetRunningStatus(pEvent, SiEitEvent.getRunningStatus());
- }
int LanguagePreferenceShort = -1;
int LanguagePreferenceExt = -1;
@@ -130,11 +128,16 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
struct tm tm_r;
struct tm t = *localtime_r(&now, &tm_r); // this initializes the time zone in 't'
t.tm_isdst = -1; // makes sure mktime() will determine the correct DST setting
+ int month = t.tm_mon;
t.tm_mon = pd->getMonth() - 1;
t.tm_mday = pd->getDay();
t.tm_hour = pd->getHour();
t.tm_min = pd->getMinute();
t.tm_sec = 0;
+ if (month == 11 && t.tm_mon == 0) // current month is dec, but event is in jan
+ t.tm_year++;
+ else if (month == 0 && t.tm_mon == 11) // current month is jan, but event is in dec
+ t.tm_year--;
time_t vps = mktime(&t);
pEvent->SetVps(vps);
}
@@ -195,7 +198,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
}
if (ExtendedEventDescriptors) {
char buffer[ExtendedEventDescriptors->getMaximumTextLength()];
- pEvent->SetDescription(ExtendedEventDescriptors->getText(buffer));
+ pEvent->SetDescription(ExtendedEventDescriptors->getText(buffer, ": "));
}
}
delete ExtendedEventDescriptors;
@@ -205,8 +208,15 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
if (LinkChannels)
channel->SetLinkChannels(LinkChannels);
+ if (Tid == 0x4E) { // we trust only the present/following info on the actual TS
+ if (SiEitEvent.getRunningStatus() >= SI::RunningStatusNotRunning)
+ pSchedule->SetRunningStatus(pEvent, SiEitEvent.getRunningStatus(), channel);
+ }
Modified = true;
}
+ if (Empty && Tid == 0x4E && getSectionNumber() == 0)
+ // ETR 211: an empty entry in section 0 of table 0x4E means there is currently no event running
+ pSchedule->ClrRunningStatus(channel);
if (Modified)
pSchedule->Sort();
}