diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-03-20 13:12:07 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-03-20 13:12:07 +0100 |
commit | 14a38b1dba6f6cc9d0ec4dc46e001b7367616073 (patch) | |
tree | f09ba7c0aee8d338f21716c57d83c76ee18ca2c8 | |
parent | 456ded045c228accff613c0ebaf7833d8164e3ec (diff) | |
download | vdr-14a38b1dba6f6cc9d0ec4dc46e001b7367616073.tar.gz vdr-14a38b1dba6f6cc9d0ec4dc46e001b7367616073.tar.bz2 |
Improved falling back to normal recording if the VPS data hasn't been seen for more than 30 seconds
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | eit.c | 4 | ||||
-rw-r--r-- | epg.c | 3 | ||||
-rw-r--r-- | epg.h | 6 | ||||
-rw-r--r-- | timers.c | 9 | ||||
-rw-r--r-- | timers.h | 5 |
6 files changed, 20 insertions, 9 deletions
@@ -3469,3 +3469,5 @@ Video Disk Recorder Revision History - Single shot timers are now reliably deleted when they have expired. - Fixed setting the colored button help after deleting a recording in case the next menu entry is a directory (thanks to Steffen Beyer). +- Improved falling back to normal recording if the VPS data hasn't been seen for more + than 30 seconds. @@ -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.102 2005/01/02 11:52:12 kls Exp $ + * $Id: eit.c 1.103 2005/03/20 12:33:51 kls Exp $ */ #include "eit.h" @@ -246,6 +246,8 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) 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 (Tid == 0x4E) + pSchedule->SetPresentSeen(); if (Modified) { pSchedule->Sort(); Schedules->SetModified(pSchedule); @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * - * $Id: epg.c 1.26 2005/03/13 13:19:15 kls Exp $ + * $Id: epg.c 1.27 2005/03/20 12:34:19 kls Exp $ */ #include "epg.h" @@ -645,6 +645,7 @@ cSchedule::cSchedule(tChannelID ChannelID) channelID = ChannelID; hasRunning = false;; modified = 0; + presentSeen = 0; } cEvent *cSchedule::AddEvent(cEvent *Event) @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * - * $Id: epg.h 1.20 2005/03/13 13:19:30 kls Exp $ + * $Id: epg.h 1.21 2005/03/20 12:32:36 kls Exp $ */ #ifndef __EPG_H @@ -111,11 +111,15 @@ private: cList<cEvent> events; bool hasRunning; time_t modified; + time_t presentSeen; public: cSchedule(tChannelID ChannelID); tChannelID ChannelID(void) const { return channelID; } time_t Modified(void) const { return modified; } + time_t PresentSeen(void) const { return presentSeen; } + bool PresentSeenWithin(int Seconds) const { return time(NULL) - presentSeen < Seconds; } void SetModified(void) { modified = time(NULL); } + void SetPresentSeen(void) { presentSeen = time(NULL); } void SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Channel = NULL); void ClrRunningStatus(cChannel *Channel = NULL); void ResetVersions(void); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.c 1.26 2005/03/20 11:19:36 kls Exp $ + * $Id: timers.c 1.27 2005/03/20 13:12:07 kls Exp $ */ #include "timers.h" @@ -355,7 +355,7 @@ bool cTimer::Matches(time_t t, bool Directly) const } if (HasFlags(tfActive)) { - if (HasFlags(tfVps) && !Directly && event && event->Vps() && event->SeenWithin(30)) { + if (HasFlags(tfVps) && !Directly && event && event->Vps() && schedule && schedule->PresentSeenWithin(30)) { startTime = event->StartTime(); stopTime = event->EndTime(); return event->IsRunning(true); @@ -410,7 +410,7 @@ time_t cTimer::StopTime(void) const return stopTime; } -void cTimer::SetEvent(const cEvent *Event) +void cTimer::SetEvent(const cSchedule *Schedule, const cEvent *Event) { if (event != Event) { //XXX TODO check event data, too??? if (Event) { @@ -421,6 +421,7 @@ void cTimer::SetEvent(const cEvent *Event) } else isyslog("timer %d (%d %04d-%04d '%s') set to no event", Index() + 1, Channel()->Number(), start, stop, file); + schedule = Event ? Schedule : NULL; event = Event; } } @@ -603,7 +604,7 @@ void cTimers::SetEvents(void) Event = e; } } - ti->SetEvent(Event); + ti->SetEvent(Schedule, Event); } } } @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.h 1.16 2005/03/20 10:55:49 kls Exp $ + * $Id: timers.h 1.17 2005/03/20 12:36:25 kls Exp $ */ #ifndef __TIMERS_H @@ -38,6 +38,7 @@ private: int lifetime; char file[MaxFileName]; char *summary; + const cSchedule *schedule; const cEvent *event; public: cTimer(bool Instant = false, bool Pause = false); @@ -75,7 +76,7 @@ public: bool Expired(void); time_t StartTime(void) const; time_t StopTime(void) const; - void SetEvent(const cEvent *Event); + void SetEvent(const cSchedule *Schedule, const cEvent *Event); void SetRecording(bool Recording); void SetPending(bool Pending); void SetInVpsMargin(bool InVpsMargin); |