diff options
-rw-r--r-- | FORMATS | 10 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | config.c | 4 | ||||
-rw-r--r-- | config.h | 8 | ||||
-rw-r--r-- | menu.c | 6 |
5 files changed, 24 insertions, 8 deletions
@@ -45,10 +45,14 @@ Video Disk Recorder File Formats The fields in a timer definition have the following meaning (from left to right): - - Timer active (0 = inactive, 1 = active) - Values larger than '1' can be used by external programs to mark active timers + - Timer active (0 = inactive, 1 = active, 3 = instant recording) + Values other than these can be used by external programs to mark active timers and recognize if the user has modified them. When a user modifes an active - timer the 'active' field will be explicitly set to '1'. + timer the 'active' field will be explicitly set to '1' (or '0', respectively, + if the user deactivates the timer). + Note: in order to allow future extensibility, external programs using the + 'active' parameter should only use the upper 16 bit of this 32 bit parameter + and leave the lower 16 bit untouched. - Program number of the channel to record - Day of recording (in case of a repeating timer), either one or more of M------ = Monday @@ -1014,3 +1014,7 @@ Video Disk Recorder Revision History will receive a "First day" setting that skips the timer for this day. - Fixed closing all unused file descriptors when opening a pipe (thanks to Werner Fink). +- Instant recordings now take the EPG data from the point in time at 5 minutes + from the start time of the recording. In order for this to work the 'active' + parameter of a timer now uses the second bit to indicate that this is an + "instant" recording (see FORMATS for details). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.c 1.84 2002/02/17 11:37:05 kls Exp $ + * $Id: config.c 1.85 2002/02/17 15:38:34 kls Exp $ */ #include "config.h" @@ -323,7 +323,7 @@ cTimer::cTimer(bool Instant) { startTime = stopTime = 0; recording = pending = false; - active = Instant; + active = Instant ? taActInst : taInactive; cChannel *ch = Channels.GetByNumber(cDvbApi::CurrentChannel()); channel = ch ? ch->number : 0; time_t t = time(NULL); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.96 2002/02/17 12:17:29 kls Exp $ + * $Id: config.h 1.97 2002/02/17 15:41:44 kls Exp $ */ #ifndef __CONFIG_H @@ -119,6 +119,12 @@ public: bool Switch(cDvbApi *DvbApi = NULL, bool Log = true); }; +enum eTimerActive { taInactive = 0, + taActive = 1, + taInstant = 2, + taActInst = (taActive | taInstant) + }; + class cTimer : public cListObject { private: time_t startTime, stopTime; @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.154 2002/02/17 14:00:54 kls Exp $ + * $Id: menu.c 1.155 2002/02/17 16:03:49 kls Exp $ */ #include "menu.h" @@ -2436,10 +2436,12 @@ cRecordControl::~cRecordControl() delete fileName; } +#define INSTANT_REC_EPG_LOOKAHEAD 300 // seconds to look into the EPG data for an instant recording + bool cRecordControl::GetEventInfo(void) { cChannel *channel = Channels.GetByNumber(timer->channel); - time_t Time = timer->IsSingleEvent() ? timer->StartTime() + ((Setup.MarginStart * 2) + 1) * 60 : timer->StartTime() + (timer->StopTime() - timer->StartTime()) / 2; + time_t Time = timer->active == taActInst ? timer->StartTime() + INSTANT_REC_EPG_LOOKAHEAD : timer->StartTime() + (timer->StopTime() - timer->StartTime()) / 2; for (int seconds = 0; seconds <= MAXWAIT4EPGINFO; seconds++) { { cThreadLock ThreadLock; |