summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-03-20 13:12:07 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-03-20 13:12:07 +0100
commit14a38b1dba6f6cc9d0ec4dc46e001b7367616073 (patch)
treef09ba7c0aee8d338f21716c57d83c76ee18ca2c8
parent456ded045c228accff613c0ebaf7833d8164e3ec (diff)
downloadvdr-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--HISTORY2
-rw-r--r--eit.c4
-rw-r--r--epg.c3
-rw-r--r--epg.h6
-rw-r--r--timers.c9
-rw-r--r--timers.h5
6 files changed, 20 insertions, 9 deletions
diff --git a/HISTORY b/HISTORY
index 7d04c258..c0cfcae3 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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.
diff --git a/eit.c b/eit.c
index a7d60c49..6c6381b1 100644
--- a/eit.c
+++ b/eit.c
@@ -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);
diff --git a/epg.c b/epg.c
index 4020e035..7b0fcd90 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 <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)
diff --git a/epg.h b/epg.h
index fc062157..6668a614 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 <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);
diff --git a/timers.c b/timers.c
index b8e67468..12cd1ac4 100644
--- a/timers.c
+++ b/timers.c
@@ -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);
}
}
}
diff --git a/timers.h b/timers.h
index 6e9c4ee4..17a1d6d1 100644
--- a/timers.h
+++ b/timers.h
@@ -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);