From 5117f359388e50d2ad46ba53330741c6b1a1e7ae Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 10 Mar 2012 16:18:00 +0100 Subject: Version 1.7.26 Original announce message: VDR developer version 1.7.26 is now available at ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.26.tar.bz2 A 'diff' against the previous version is available at ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.25-1.7.26.diff MD5 checksums: eb57398e44935ecb0bfc532bdfead312 vdr-1.7.26.tar.bz2 62e0f39e2c53ec2b5abd3ebb0e00ce3d vdr-1.7.25-1.7.26.diff WARNING: ======== This is a developer version. Even though I use it in my productive environment. I strongly recommend that you only use it under controlled conditions and for testing and debugging. From the HISTORY file: - Now checking for NULL in cOsd::AddPixmap() (suggested by Christoph Haubrich). - Fixed the German translation of "VDR will shut down in %s minutes" (thanks to Frank Neumann). - The replay progress display is now turned on whenever a mark is toggled (not only when one is set). - Toggling a mark now restarts the timeout of the replay progress display. - Fixed a possible race condition with the SVDRP commands CLRE and PUTE, where EPG data from the transponder could be handled even though it shouldn't be handled for 10 seconds. - Added some missing member initializations in cBitmap. - Improved displaying the play mode in the ST:TNG skin. - Made the ST:TNG skin the default in case the user selected skin is not available. - Improved displaying signal strength and quality in the ST:TNG skin's channel display. - Fixed switching devices to the transponders of VPS recordings in case there are only bonded devices. The cDevice's "avoid device" mechanism has been replaced by using "occupied". - Fixed selecting devices for the EPG scan in case the primary device is bonded with an other one. - Removed the calls to EITScanner.UsesDevice(this) from dvb[hs]ddevice.c, because the code following these calls is only executed if LiveView is true, which is never the case when the EITScanner switches to a channel. - Removed the obsolete function cEITScanner::UsesDevice(). If a plugin has used this function to find out whether a call to its cStatus::ChannelSwitch() function was due to a live channel switch, it can use that function's new parameter LiveView. Any plugins that implement cStatus::ChannelSwitch() need to add the parameter 'bool LiveView' to that function. - Fixed parsing channel data in case the audio pid is 0. On channels that only broadcast Dolby Digital audio there were sometimes log entries like "changing pids of channel ... from ... to ..." with no apparent difference between the old and new set of pids. - Fixed checking pids in case a channel has only Dolby Digital audio. - The Green button in the "Edit timer" menu can now be used to toggle between single shot and repeating timers. This is the same as pressing '0' when the "Day" field is selected, but it works at any time (and is more obvious). - Revoked "If the first event in a schedule has a table id of 0x00, any incoming EIT data for that schedule from the DVB stream will be completely ignored". - Added a new plugin interface for implementing EPG handlers. + A plugin can implement an EPG handler by creating an object derived from cEpgHandler and implementing the necessary member functions. + The special handling of events with table id 0x00 has been dropped. For backwards compatibility EPG events with table ids lower than 0x4E will be treated as if they had a table id of 0x4E, and the new plugin 'epgtableid0' can be used to have them handled like in previous versions. + The default table id for a newly created cEvent has been changed to 0xFF, which is higher than any normal table id that is broadcast in the EIT data. See PLUGINS.html, section "Electronic Program Guide" for more information. --- epg.c | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 152 insertions(+), 2 deletions(-) (limited to 'epg.c') diff --git a/epg.c b/epg.c index 2ff1052..f5c9b3a 100644 --- a/epg.c +++ b/epg.c @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $Id: epg.c 2.11 2012/02/13 14:58:19 kls Exp $ + * $Id: epg.c 2.12 2012/03/10 13:14:27 kls Exp $ */ #include "epg.h" @@ -114,7 +114,7 @@ cEvent::cEvent(tEventID EventID) { schedule = NULL; eventID = EventID; - tableID = 0; + tableID = 0xFF; // actual table ids are 0x4E..0x60 version = 0xFF; // actual version numbers are 0..31 runningStatus = SI::RunningStatusUndefined; title = NULL; @@ -1296,3 +1296,153 @@ void cEpgDataReader::Action(void) { cSchedules::Read(); } + +// --- cEpgHandler ----------------------------------------------------------- + +cEpgHandler::cEpgHandler(void) +{ + EpgHandlers.Add(this); +} + +cEpgHandler::~cEpgHandler() +{ + EpgHandlers.Del(this, false); +} + +// --- cEpgHandlers ---------------------------------------------------------- + +cEpgHandlers EpgHandlers; + +bool cEpgHandlers::IgnoreChannel(const cChannel *Channel) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->IgnoreChannel(Channel)) + return true; + } + return false; +} + +bool cEpgHandlers::HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->HandleEitEvent(Schedule, EitEvent, TableID, Version)) + return true; + } + return false; +} + +void cEpgHandlers::SetEventID(cEvent *Event, tEventID EventID) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->SetEventID(Event, EventID)) + return; + } + Event->SetEventID(EventID); +} + +void cEpgHandlers::SetTitle(cEvent *Event, const char *Title) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->SetTitle(Event, Title)) + return; + } + Event->SetTitle(Title); +} + +void cEpgHandlers::SetShortText(cEvent *Event, const char *ShortText) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->SetShortText(Event, ShortText)) + return; + } + Event->SetShortText(ShortText); +} + +void cEpgHandlers::SetDescription(cEvent *Event, const char *Description) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->SetDescription(Event, Description)) + return; + } + Event->SetDescription(Description); +} + +void cEpgHandlers::SetContents(cEvent *Event, uchar *Contents) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->SetContents(Event, Contents)) + return; + } + Event->SetContents(Contents); +} + +void cEpgHandlers::SetParentalRating(cEvent *Event, int ParentalRating) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->SetParentalRating(Event, ParentalRating)) + return; + } + Event->SetParentalRating(ParentalRating); +} + +void cEpgHandlers::SetStartTime(cEvent *Event, time_t StartTime) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->SetStartTime(Event, StartTime)) + return; + } + Event->SetStartTime(StartTime); +} + +void cEpgHandlers::SetDuration(cEvent *Event, int Duration) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->SetDuration(Event, Duration)) + return; + } + Event->SetDuration(Duration); +} + +void cEpgHandlers::SetVps(cEvent *Event, time_t Vps) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->SetVps(Event, Vps)) + return; + } + Event->SetVps(Vps); +} + +void cEpgHandlers::FixEpgBugs(cEvent *Event) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->FixEpgBugs(Event)) + return; + } + Event->FixEpgBugs(); +} + +void cEpgHandlers::HandleEvent(cEvent *Event) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->HandleEvent(Event)) + break; + } +} + +void cEpgHandlers::SortSchedule(cSchedule *Schedule) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->SortSchedule(Schedule)) + return; + } + Schedule->Sort(); +} + +void cEpgHandlers::DropOutdated(cSchedule *Schedule, time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version) +{ + for (cEpgHandler *eh = First(); eh; eh = Next(eh)) { + if (eh->DropOutdated(Schedule, SegmentStart, SegmentEnd, TableID, Version)) + return; + } + Schedule->DropOutdated(SegmentStart, SegmentEnd, TableID, Version); +} -- cgit v1.2.3