diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2004-02-29 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2004-02-29 18:00:00 +0100 |
commit | 5a4eb3f1041b8a53826cebe570f9d201f3d35826 (patch) | |
tree | 4444f7bec812600713430e7f0570dfdd0bf9136e /eit.c | |
parent | 3fc29659759abb10154b78f9e3568407e523e1fc (diff) | |
download | vdr-patch-lnbsharing-5a4eb3f1041b8a53826cebe570f9d201f3d35826.tar.gz vdr-patch-lnbsharing-5a4eb3f1041b8a53826cebe570f9d201f3d35826.tar.bz2 |
Version 1.3.5vdr-1.3.5
- Fixed reading the EPG preferred language parameter from 'setup.conf'.
- Fixed switching to a visible programme in case the current channel has neither
a video nor an audio PID.
- Fixed editing channels (SID now range checked) and creating new channels (NID,
TID and RID are now set to 0).
- Fixed transponder handling to make it work with satellites that provide two
transponders on the same frequency, with different polarization, like Hispasat
at S30.0W (thanks to Thomas Bergwinkl for pointing this out). See man vdr(5)
for details about the enhanced channel ID format.
- Since there appears to be no general solution for the UPT error yet, a recording
now initiates an "emergency exit" if the number of UPT errors during one
recording exceeds 10 (suggested by Gregoire Favre). Since the UPT error doesn't
happen on my system, this has not been explicitly tested.
The "preliminary fix" for the UPT error in VDR/dvbdevice.c has been disabled
by default, since it makes channel switching unpleasently slow. If you want
to have that workaround back, you can uncomment the line
//#define WAIT_FOR_LOCK_AFTER_TUNING 1
in VDR/dvbdevice.c.
- Adapted the 'sky' plugin to use the actual channel IDs, and to fetch EPG data
from www.bleb.org.
- Limited automatic retuning to devices that actually provide the transponder
(necessary for the 'sky' plugin).
- Fixed handling receivers in the 'sky' plugin, so that a recording on the same
channel won't interrupt an ongoing Transfer Mode.
- Added subtable ID and TSDT handling to 'libsi' (thanks to Marcel Wiesweg).
- Fixed some Russian OSD texts (thanks to Vyacheslav Dikonov).
- Added the 'running status' to the EPG events. This is necessary for implementing
the VPS function for recording.
- Removed the obsolete 'present' and 'following' handling from the EPG data.
- The EPG data is now always kept sorted chronologically in the internal data
structures. This also means that any EPG data retrieved through the SVRDP
command LSTE is guaranteed to be sorted by start time.
- Now using the 'running status' in the channel display, so that a programme
that has an end time that is before the current time, but is still running,
will still be shown in the display (provided the broadcasters handle the
'running status' flag correctly). This also applies to programmes that have
a start time that is in the future, but are already running.
- Implemented an "EPG linger time", which can be set to have older EPG information
still displayed in the "Schedule" menu (thanks to Jaakko Hyvätti).
- Added PDCDescriptor handling to 'libsi'.
- Implemented handling the VPS timestamps (aka "Programme Identification Label")
for full VPS support for timers (provided the tv stations actually broadcast
this information). The VPS time is displayed in the event info page if it exists
and is different than the event's start time.
- Extended the SVDRP command LSTE to allow limiting the listed data to a given
channel, the present or following events, or events at a given time (thanks to
Thomas Heiligenmann).
- Fixed a typo in libsi/si.h (thanks to Stéphane Esté-Gracias).
- Timers can now be set to use the VPS information to control recording a programme.
The new setup options "Recording/Use VPS" and "Recording/VPS margin", as well as
the "VPS" option in the individual timers, can be used to control this feature
(see MANUAL for details).
Note that this feature will certainly need a lot of testing before it can be
called "safe"!
- The "Schedule" and "What's on now/next?" menus now have an additional column
which displays information on whether there is a timer defined for an event,
whether an event has a VPS time that's different than its start time, and
whether an event is currently running (see MANUAL under "The "Schedule" Menu"
for details).
Diffstat (limited to 'eit.c')
-rw-r--r-- | eit.c | 61 |
1 files changed, 34 insertions, 27 deletions
@@ -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.86 2004/02/08 10:26:54 kls Exp $ + * $Id: eit.c 1.89 2004/02/22 13:17:52 kls Exp kls $ */ #include "eit.h" @@ -43,18 +43,19 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) Schedules->Add(pSchedule); } + bool Modified = false; + SI::EIT::Event SiEitEvent; for (SI::Loop::Iterator it; eventLoop.hasNext(it); ) { SiEitEvent = eventLoop.getNext(it); cEvent *pEvent = (cEvent *)pSchedule->GetEvent(SiEitEvent.getEventId(), SiEitEvent.getStartTime()); if (!pEvent) { - // If we don't have that event ID yet, we create a new one. + // If we don't have that event yet, we create a new one. // Otherwise we copy the information into the existing event anyway, because the data might have changed. pEvent = pSchedule->AddEvent(new cEvent(channelID, SiEitEvent.getEventId())); if (!pEvent) continue; - pEvent->SetTableID(Tid); } else { // We have found an existing event, either through its event ID or its start time. @@ -62,19 +63,9 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) // not be overwritten. if (pEvent->TableID() == 0x00) continue; - // If the new event comes from a table that belongs to an "other TS" and the existing - // one comes from an "actual TS" table, let's skip it. - #define ISACTUALTS(tid) (tid == 0x4E || (tid & 0x50) == 0x50) - if (!ISACTUALTS(Tid) && ISACTUALTS(pEvent->TableID())) - continue; - // If the new event comes from a "schedule" table and the existing one comes from - // a "present/following" table, let's skip it (the p/f table usually contains more - // information, like e.g. a description). - if ((Tid & 0x50) == 0x50 && pEvent->TableID() == 0x4E || (Tid & 0x60) == 0x60 && pEvent->TableID() == 0x4F) - continue; - // If both events come from the same "schedule" table and the new event's table id is larger than the - // existing one's, let's skip it (higher tids mean "farther in the future" and usually have less information). - if (((Tid & 0x50) == 0x50 || (Tid & 0x60) == 0x60) && (pEvent->TableID() & 0xF0) == (Tid & 0xF0) && (Tid > pEvent->TableID())) + // If the new event has a higher table ID, let's skip it. + // The lower the table ID, the more "current" the information. + if (Tid > pEvent->TableID()) continue; // If the new event comes from the same table and has the same version number // as the existing one, let's skip it to avoid unnecessary work. @@ -85,9 +76,16 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) if (Tid == pEvent->TableID() && pEvent->Version() == getVersionNumber()) continue; } - pEvent->SetVersion(getVersionNumber()); - pEvent->SetTableID(Tid); + // XXX TODO log different (non-zero) event IDs for the same event??? pEvent->SetEventID(SiEitEvent.getEventId()); // unfortunately some stations use different event ids for the same event in different tables :-( + pEvent->SetTableID(Tid); + 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; @@ -126,6 +124,21 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) break; case SI::ParentalRatingDescriptorTag: break; + case SI::PDCDescriptorTag: { + SI::PDCDescriptor *pd = (SI::PDCDescriptor *)d; + time_t now = time(NULL); + 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 + 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; + time_t vps = mktime(&t); + pEvent->SetVps(vps); + } + break; case SI::TimeShiftedEventDescriptorTag: { SI::TimeShiftedEventDescriptor *tsed = (SI::TimeShiftedEventDescriptor *)d; cSchedule *rSchedule = (cSchedule *)Schedules->GetSchedule(tChannelID(Source, 0, 0, tsed->getReferenceServiceId())); @@ -188,20 +201,14 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) delete ExtendedEventDescriptors; delete ShortEventDescriptor; - pEvent->SetStartTime(SiEitEvent.getStartTime()); - pEvent->SetDuration(SiEitEvent.getDuration()); pEvent->FixEpgBugs(); - if (isPresentFollowing()) { - if (SiEitEvent.getRunningStatus() == SI::RunningStatusPausing || SiEitEvent.getRunningStatus() == SI::RunningStatusRunning) - pSchedule->SetPresentEvent(pEvent); - else if (SiEitEvent.getRunningStatus() == SI::RunningStatusStartsInAFewSeconds) - pSchedule->SetFollowingEvent(pEvent); - } - if (LinkChannels) channel->SetLinkChannels(LinkChannels); + Modified = true; } + if (Modified) + pSchedule->Sort(); } // --- cTDT ------------------------------------------------------------------ |