Added log entries whenever the running status of an event changes

This commit is contained in:
Klaus Schmidinger 2004-03-06 14:33:22 +01:00
parent 18d3851b72
commit 12c0b0dd15
4 changed files with 16 additions and 10 deletions

View File

@ -2720,3 +2720,5 @@ Video Disk Recorder Revision History
- Fixed some descriptor handling in 'libsi' (thanks to Stéphane Esté-Gracias). - Fixed some descriptor handling in 'libsi' (thanks to Stéphane Esté-Gracias).
- Fixed handling the current menu item (thanks to Marc Hoppe). - Fixed handling the current menu item (thanks to Marc Hoppe).
- Fixed assigning events to timers (they no longer get "stuck"). - 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).

10
eit.c
View File

@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * 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>. * 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 $ * $Id: eit.c 1.90 2004/03/06 14:24:22 kls Exp $
*/ */
#include "eit.h" #include "eit.h"
@ -82,10 +82,6 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
pEvent->SetVersion(getVersionNumber()); pEvent->SetVersion(getVersionNumber());
pEvent->SetStartTime(SiEitEvent.getStartTime()); pEvent->SetStartTime(SiEitEvent.getStartTime());
pEvent->SetDuration(SiEitEvent.getDuration()); pEvent->SetDuration(SiEitEvent.getDuration());
if (isPresentFollowing()) {
if (SiEitEvent.getRunningStatus() > SI::RunningStatusNotRunning)
pSchedule->SetRunningStatus(pEvent, SiEitEvent.getRunningStatus());
}
int LanguagePreferenceShort = -1; int LanguagePreferenceShort = -1;
int LanguagePreferenceExt = -1; int LanguagePreferenceExt = -1;
@ -205,6 +201,10 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
if (LinkChannels) if (LinkChannels)
channel->SetLinkChannels(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; Modified = true;
} }
if (Modified) if (Modified)

10
epg.c
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by * Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* *
* $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" #include "epg.h"
@ -527,11 +527,15 @@ const cEvent *cSchedule::GetEventAround(time_t Time) const
return pe; 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)) { 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); p->SetRunningStatus(RunningStatus);
}
else if (RunningStatus >= SI::RunningStatusPausing && p->RunningStatus() > SI::RunningStatusNotRunning) else if (RunningStatus >= SI::RunningStatusPausing && p->RunningStatus() > SI::RunningStatusNotRunning)
p->SetRunningStatus(SI::RunningStatusNotRunning); p->SetRunningStatus(SI::RunningStatusNotRunning);
} }

4
epg.h
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by * Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* *
* $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 #ifndef __EPG_H
@ -82,7 +82,7 @@ private:
public: public:
cSchedule(tChannelID ChannelID); cSchedule(tChannelID ChannelID);
tChannelID ChannelID(void) const { return 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 ResetVersions(void);
void Sort(void); void Sort(void);
void Cleanup(time_t Time); void Cleanup(time_t Time);