diff --git a/HISTORY b/HISTORY index 79e560d6..3bc8d072 100644 --- a/HISTORY +++ b/HISTORY @@ -2720,3 +2720,5 @@ Video Disk Recorder Revision History - 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). diff --git a/eit.c b/eit.c index e1f4509a..56ee2f58 100644 --- a/eit.c +++ b/eit.c @@ -8,7 +8,7 @@ * Robert Schneider and Rolf Hakenes . * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg . * - * $Id: eit.c 1.89 2004/02/22 13:17:52 kls Exp $ + * $Id: eit.c 1.90 2004/03/06 14:24:22 kls Exp $ */ #include "eit.h" @@ -82,10 +82,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; @@ -205,6 +201,10 @@ 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 (Modified) diff --git a/epg.c b/epg.c index b979256c..4ffea63f 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 1.15 2004/03/06 10:12:50 kls Exp $ + * $Id: epg.c 1.16 2004/03/06 14:33:22 kls Exp $ */ #include "epg.h" @@ -527,11 +527,15 @@ const cEvent *cSchedule::GetEventAround(time_t Time) const return pe; } -void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus) +void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Channel) { for (cEvent *p = events.First(); p; p = events.Next(p)) { - if (p == Event) + if (p == Event) { + if (Channel && p->RunningStatus() != RunningStatus && (RunningStatus > SI::RunningStatusNotRunning || p->RunningStatus() > SI::RunningStatusUndefined)) + if (Channel->Number() <= 30)//XXX maybe log only those that have timers??? + isyslog("channel %d (%s) event %s '%s' status %d", Channel->Number(), Channel->Name(), Event->GetTimeString(), Event->Title(), RunningStatus); p->SetRunningStatus(RunningStatus); + } else if (RunningStatus >= SI::RunningStatusPausing && p->RunningStatus() > SI::RunningStatusNotRunning) p->SetRunningStatus(SI::RunningStatusNotRunning); } diff --git a/epg.h b/epg.h index c8636f7f..88355522 100644 --- a/epg.h +++ b/epg.h @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $Id: epg.h 1.12 2004/03/06 10:09:40 kls Exp $ + * $Id: epg.h 1.13 2004/03/06 14:01:38 kls Exp $ */ #ifndef __EPG_H @@ -82,7 +82,7 @@ private: public: cSchedule(tChannelID ChannelID); tChannelID ChannelID(void) const { return channelID; } - void SetRunningStatus(cEvent *Event, int RunningStatus); + void SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Channel = NULL); void ResetVersions(void); void Sort(void); void Cleanup(time_t Time);