From 162ed534b0cb1ffc481ac5a1b7eb4a2e3418aa4b Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 17 Oct 2003 18:00:00 +0200 Subject: Version 1.2.6pre1 - Updated the required driver version in INSTALL (thanks to Jens Groth for reporting this one). - Fixed missing channel info after an incomplete channel group switch (thanks to Andreas Trauer). - Fixed handling a channels.conf that contains a ":@nnn" line as its last entry (thanks to Ralf Klueber). - Fixed detecting the /dev/videoN devices for GRAB in case there are others before the DVB devices (thanks to Andreas Kool). - Updated 'channels.conf.terr' for Berlin (thanks to Markus Hardt). - Fixed handling rc key learning in case cRemote::Initialize() returns 'false' (thanks to Oliver Endriss). - Fixed initializing the highlight area in cDvbSpuDecoder (thanks to Sven Goethel). - Now trying to get a timer's channel without RID when loading 'timers.conf' (thanks to Thomas Rausch). - Removed the unused 0x73 (TOT) filter in eit.c (thanks to Andreas Trauer). - Fixed extracting the ES data in cDvbDevice::StillPicture() (thanks to Stefan Huelswitt). - Added MPEG1 handling to cDvbDevice::StillPicture() (thanks to Thomas Heiligenmann). - Changed the default "Lifetime" to 99, which means that recordings will never be deleted automatically in case the disk runs full (suggested by Oliver Endriss). Note that in an existing VDR installation the current value as set in 'setup.conf' will still be used - this change only affects new VDR installations. - Edited recordings will now never be deleted automatically if the disk runs full (suggested by Emil Naepflein). - Channel IDs are now checked when reading 'channels.conf' to avoid later problems with timers. --- CONTRIBUTORS | 23 +++++++++++++ HISTORY | 33 ++++++++++++++++++- INSTALL | 2 +- MANUAL | 5 ++- channels.c | 11 +++++-- channels.conf.terr | 16 ++++----- config.c | 4 +-- config.h | 6 ++-- dvbdevice.c | 97 +++++++++++++++++++++++++++++++++++++++++++++--------- dvbdevice.h | 5 ++- dvbspu.c | 6 +++- eit.c | 7 +--- interface.c | 14 +++++--- interface.h | 4 +-- menu.c | 3 +- recording.c | 11 +++++-- recording.h | 3 +- timers.c | 4 +-- 18 files changed, 199 insertions(+), 55 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 04e01a2..3c86eee 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -176,6 +176,7 @@ Stefan Huelswitt for fixing a memory leak in cNonBlockingFileReader for fixing an uninitialized variable in cDisplayChannel for fixing a possible access of invalid file handles in cSIProcessor::Action() + for fixing extracting the ES data in cDvbDevice::StillPicture() Ulrich Röder for pointing out that there are channels that have a symbol rate higher than @@ -267,6 +268,7 @@ Andy Grobb Thomas Heiligenmann for implementing the SVDRP commands LSTR and DELR + for adding MPEG1 handling to cDvbDevice::StillPicture() Norbert Schmidt for filling in some missing teletext PIDs @@ -495,6 +497,8 @@ Oliver Endriss recording that is still going on for fixing checking for VIDEO_STREAM_S in cRemux::SetBrokenLink() for suggesting to add 'repeat' function keys '7' and '9' + for fixing handling rc key learning in case cRemote::Initialize() returns 'false' + for suggesting to change the default "Lifetime" to 99 Reinhard Walter Buchner for adding some satellites to 'sources.conf' @@ -568,6 +572,8 @@ Andreas Kool for his help in keeping 'channels.conf.cable' up to date for fixing the TS to PES repacker so that it works with MPEG1 streams for reporting a problem with empty values in setup.conf + for fixing detecting the /dev/videoN devices for GRAB in case there are others + before the DVB devices Guy Roussin for suggesting not to display channel group delimiters without text @@ -588,6 +594,7 @@ Emil Naepflein housekeeping for fixing selecting the device, because sometimes an FTA recording terminated a CA recording + for suggesting to never delete edited recordings automatically if the disk runs full Gerald Berwolf for suggesting to deactivate some templates in tools.h in case some plugin needs to @@ -598,6 +605,7 @@ Thomas Sailer Sven Goethel for making switching audio channels work without stopping/restarting the DMX + for fixing initializing the highlight area in cDvbSpuDecoder Jan Rieger for suggestions and testing raw keyboard input @@ -728,6 +736,8 @@ Niko Tarnanen and Rolf Ahrenberg Ralf Klueber for reporting a bug in cutting a recording if there is only a single editing mark + for reporting a bug in handling a channels.conf that contains a ":@nnn" line as + its last entry Hermann Gausterer for suggesting to switch to the recording channel in case the current channel @@ -821,3 +831,16 @@ Alexander Wetzel Marco Franceschetti for updating 'ca.conf' + +Jens Groth + for reporting a an outdated driver version number in INSTALL + +Andreas Trauer + for fixing missing channel info after an incomplete channel group switch + for removing the unused 0x73 (TOT) filter in eit.c + +Markus Hardt + for his help in keeping 'channels.conf.terr' up to date + +Thomas Rausch + for making VDR try to get a timer's channel without RID when loading 'timers.conf' diff --git a/HISTORY b/HISTORY index 6ac90e7..3ce2d06 100644 --- a/HISTORY +++ b/HISTORY @@ -2280,7 +2280,7 @@ Video Disk Recorder Revision History - Fixed a possible crash in case a VFAT file system is used without compiling VDR with VFAT=1 (thanks to Ernst Fürst for reporting this one). - Now the program uses the values of VIDEODIR and PLUGINDIR defined in Makefile - or Makefile.config as defaults (thanks to Steffen Barszus). + or Make.config as defaults (thanks to Steffen Barszus). - Added the usual menu timeout to the CAM menus. 2003-08-17: Version 1.2.3 (not officially released) @@ -2402,3 +2402,34 @@ Video Disk Recorder Revision History 2003-09-17: Version 1.2.5 - Updated 'channels.conf.cable' (thanks to Stefan Hußfeldt). + +2003-10-17: Version 1.2.6pre1 + +- Updated the required driver version in INSTALL (thanks to Jens Groth for + reporting this one). +- Fixed missing channel info after an incomplete channel group switch (thanks + to Andreas Trauer). +- Fixed handling a channels.conf that contains a ":@nnn" line as its last entry + (thanks to Ralf Klueber). +- Fixed detecting the /dev/videoN devices for GRAB in case there are others + before the DVB devices (thanks to Andreas Kool). +- Updated 'channels.conf.terr' for Berlin (thanks to Markus Hardt). +- Fixed handling rc key learning in case cRemote::Initialize() returns 'false' + (thanks to Oliver Endriss). +- Fixed initializing the highlight area in cDvbSpuDecoder (thanks to Sven Goethel). +- Now trying to get a timer's channel without RID when loading 'timers.conf' + (thanks to Thomas Rausch). +- Removed the unused 0x73 (TOT) filter in eit.c (thanks to Andreas Trauer). +- Fixed extracting the ES data in cDvbDevice::StillPicture() (thanks to Stefan + Huelswitt). +- Added MPEG1 handling to cDvbDevice::StillPicture() (thanks to Thomas + Heiligenmann). +- Changed the default "Lifetime" to 99, which means that recordings will + never be deleted automatically in case the disk runs full (suggested by + Oliver Endriss). Note that in an existing VDR installation the current + value as set in 'setup.conf' will still be used - this change only affects + new VDR installations. +- Edited recordings will now never be deleted automatically if the disk runs + full (suggested by Emil Naepflein). +- Channel IDs are now checked when reading 'channels.conf' to avoid later + problems with timers. diff --git a/INSTALL b/INSTALL index a49acfc..987d5a5 100644 --- a/INSTALL +++ b/INSTALL @@ -28,7 +28,7 @@ If you have the DVB driver source in a different location you will have to change the definition of DVBDIR in the Makefile (see the file Make.config.template). -VDR requires the Linux-DVB card driver version dated 2003-05-24 or higher +VDR requires the Linux-DVB card driver version dated 2003-08-23 or higher to work properly. After extracting the package, change into the VDR directory diff --git a/MANUAL b/MANUAL index 29eb334..8687e70 100644 --- a/MANUAL +++ b/MANUAL @@ -327,6 +327,9 @@ Version 1.2 a second. A "start" mark marks the first frame of a resulting video sequence, and an "end" mark marks the last frame of that sequence. + An edited recording (indicated by the '%' character) will never be deleted + automatically in case the disk runs full (no matter what "lifetime" it has). + * Programming the Timer Use the "Timer" menu to maintain your list of timer controlled recordings. @@ -536,7 +539,7 @@ Version 1.2 with a priority below PrimaryLimit will never execute. Default priority = 50 The default Priority and Lifetime values used when - Default lifetime = 50 creating a new timer event. A Lifetime value of 99 + Default lifetime = 99 creating a new timer event. A Lifetime value of 99 means that this recording will never be deleted automatically. diff --git a/channels.c b/channels.c index 6ff7188..69ff3c9 100644 --- a/channels.c +++ b/channels.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 1.14 2003/09/09 18:55:26 kls Exp $ + * $Id: channels.c 1.16 2003/10/17 15:42:40 kls Exp $ */ #include "channels.h" @@ -369,6 +369,10 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID) free(vpidbuf); free(apidbuf); free(namebuf); + if (!GetChannelID().Valid()) { + esyslog("ERROR: channel data results in invalid ID!"); + return false; + } if (!AllowNonUniqueID && Channels.GetByChannelID(GetChannelID())) { esyslog("ERROR: channel data not unique!"); return false; @@ -431,10 +435,11 @@ void cChannels::ReNumber( void ) if (channel->Number() > Number) Number = channel->Number(); } - else + else { + maxNumber = Number; channel->SetNumber(Number++); + } } - maxNumber = Number - 1; } cChannel *cChannels::GetByNumber(int Number, int SkipGap) diff --git a/channels.conf.terr b/channels.conf.terr index 038708c..f6a8456 100644 --- a/channels.conf.terr +++ b/channels.conf.terr @@ -46,13 +46,13 @@ KISS (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1101:0:0:26176:0:0:0 oneword (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1501:0:0:26432:0:0:0 Smash Hits! (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1201:0:0:26240:0:0:0 : DVB-T Berlin, Germany -BBC World:177500:I0C23D0M16B8T8G8Y0:T:27500:49:50:55:0:16387:0:0:0 -FAB:177500:I0C23D0M16B8T8G8Y0:T:27500:3073:3074:3079:0:16576:0:0:0 -WDR:177500:I0C23D0M16B8T8G8Y0:T:27500:241:242:247:0:15:0:0:0 -SWR BW:177500:I0C23D0M16B8T8G8Y0:T:27500:257:258:263:0:16:0:0:0 -MDR Fernsehen:191500:I0C23D0M16B8T8G8Y0:T:27500:101:102:104:0:1:0:0:0 -arte:191500:I0C23D0M16B8T8G8Y0:T:27500:201:202,203:204:0:2:0:0:0 -NDR Fernsehen:191500:I0C23D0M16B8T8G8Y0:T:27500:301:302:304:0:3:0:0:0 +BBC World:177500:I0C23D0M16B7T8G8Y0:T:27500:49:50:55:0:16387:0:0:0 +FAB:177500:I0C23D0M16B7T8G8Y0:T:27500:3073:3074:3079:0:16576:0:0:0 +WDR:177500:I0C23D0M16B7T8G8Y0:T:27500:241:242:247:0:15:0:0:0 +Südwest BW/RP:177500:I0C23D0M16B7T8G8Y0:T:27500:257:258:263:0:16:0:0:0 +MDR Fernsehen:191500:I0C23D0M16B7T8G8Y0:T:27500:101:102:104:0:1:0:0:0 +arte:191500:I0C23D0M16B7T8G8Y0:T:27500:201:202,203:204:0:2:0:0:0 +NDR Fernsehen:191500:I0C23D0M16B7T8G8Y0:T:27500:301:302:304:0:3:0:0:0 RTL:506000:I0C23D0M16B8T8G8Y0:T:27500:337:338:343:0:16405:0:0:0 RTL2:506000:I0C23D0M16B8T8G8Y0:T:27500:353:354:359:0:16406:0:0:0 Super RTL:506000:I0C23D0M16B8T8G8Y0:T:27500:433:434:439:0:16411:0:0:0 @@ -62,7 +62,7 @@ RBB Berlin:522000:I0C23D0M16B8T8G8Y0:T:27500:1201:1202:1204:0:12:0:0:0 Phoenix:522000:I0C23D0M16B8T8G8Y0:T:27500:1301:1302:1304:0:13:0:0:0 Das Erste:522000:I0C23D0M16B8T8G8Y0:T:27500:1401:1402:1404:0:14:0:0:0 ZDF:570000:I0C23D0M16B8T8G8Y0:T:27500:545:546:551:0:514:0:0:0 -Info/3sat:570000:I0C23D0M16B8T8G8Y0:T:27500:561:562:551:0:515:0:0:0 +Info/3sat:570000:I0C23D0M16B8T8G8Y0:T:27500:561:562:567:0:515:0:0:0 Doku/KiKa:570000:I0C23D0M16B8T8G8Y0:T:27500:593:594:599:0:517:0:0:0 Kabel 1:658000:I0C23D0M16B8T8G8Y0:T:27500:161:162:167:0:16394:0:0:0 N24:658000:I0C23D0M16B8T8G8Y0:T:27500:225:226:231:0:16398:0:0:0 diff --git a/config.c b/config.c index 0ef2d57..d3f2db7 100644 --- a/config.c +++ b/config.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.c 1.116 2003/08/24 11:00:24 kls Exp $ + * $Id: config.c 1.117 2003/10/17 14:11:27 kls Exp $ */ #include "config.h" @@ -266,7 +266,7 @@ cSetup::cSetup(void) SortTimers = 1; PrimaryLimit = 0; DefaultPriority = 50; - DefaultLifetime = 50; + DefaultLifetime = 99; PausePriority = 10; PauseLifetime = 1; UseSubtitle = 1; diff --git a/config.h b/config.h index 9f5ab38..a5b3354 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.174 2003/09/17 16:08:56 kls Exp $ + * $Id: config.h 1.176 2003/10/17 12:35:23 kls Exp $ */ #ifndef __CONFIG_H @@ -19,8 +19,8 @@ #include "device.h" #include "tools.h" -#define VDRVERSION "1.2.5" -#define VDRVERSNUM 10205 // Version * 10000 + Major * 100 + Minor +#define VDRVERSION "1.2.6pre1" +#define VDRVERSNUM 10206 // Version * 10000 + Major * 100 + Minor #define MAXPRIORITY 99 #define MAXLIFETIME 99 diff --git a/dvbdevice.c b/dvbdevice.c index f29745b..fd0a0d0 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.64 2003/09/06 13:19:33 kls Exp $ + * $Id: dvbdevice.c 1.67 2003/10/17 15:36:13 kls Exp $ */ #include "dvbdevice.h" @@ -307,6 +307,8 @@ void cDvbTuner::Action(void) // --- cDvbDevice ------------------------------------------------------------ +int cDvbDevice::devVideoOffset = -1; + cDvbDevice::cDvbDevice(int n) { dvbTuner = NULL; @@ -317,7 +319,7 @@ cDvbDevice::cDvbDevice(int n) // Devices that are present on all card types: - int fd_frontend = DvbOpen(DEV_DVB_FRONTEND, n, O_RDWR | O_NONBLOCK); + int fd_frontend = DvbOpen(DEV_DVB_FRONTEND, n, O_RDWR | O_NONBLOCK); // Devices that are only present on cards with decoders: @@ -329,6 +331,35 @@ cDvbDevice::cDvbDevice(int n) fd_dvr = -1; + // The offset of the /dev/video devices: + + if (devVideoOffset < 0) { // the first one checks this + FILE *f = NULL; + char buffer[PATH_MAX]; + for (int ofs = 0; ofs < 100; ofs++) { + snprintf(buffer, sizeof(buffer), "/proc/video/dev/video%d", ofs); + if ((f = fopen(buffer, "r")) != NULL) { + if (fgets(buffer, sizeof(buffer), f)) { + if (strstr(buffer, "DVB Board")) { // found the _first_ DVB card + devVideoOffset = ofs; + dsyslog("video device offset is %d", devVideoOffset); + break; + } + } + else + break; + fclose(f); + } + else + break; + } + if (devVideoOffset < 0) + devVideoOffset = 0; + if (f) + fclose(f); + } + devVideoIndex = (devVideoOffset >= 0 && HasDecoder()) ? devVideoOffset++ : -1; + // Video format: SetVideoFormat(Setup.VideoFormat ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3); @@ -427,8 +458,10 @@ cSpuDecoder *cDvbDevice::GetSpuDecoder(void) bool cDvbDevice::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX, int SizeY) { + if (devVideoIndex < 0) + return false; char buffer[PATH_MAX]; - snprintf(buffer, sizeof(buffer), "%s%d", DEV_VIDEO, CardIndex()); + snprintf(buffer, sizeof(buffer), "%s%d", DEV_VIDEO, devVideoIndex); int videoDev = open(buffer, O_RDWR); if (videoDev < 0) LOG_ERROR_STR(buffer); @@ -915,21 +948,53 @@ void cDvbDevice::StillPicture(const uchar *Data, int Length) return; int i = 0; int blen = 0; - while (i < Length - 4) { - if (Data[i] == 0x00 && Data[i + 1] == 0x00 && Data[i + 2] == 0x01 && (Data[i + 3] & 0xF0) == 0xE0) { - // skip PES header - int offs = i + 6; + while (i < Length - 6) { + if (Data[i] == 0x00 && Data[i + 1] == 0x00 && Data[i + 2] == 0x01) { int len = Data[i + 4] * 256 + Data[i + 5]; - // skip header extension - if ((Data[i + 6] & 0xC0) == 0x80) { - offs += 3; - offs += Data[i + 8]; - len -= 3; - len -= Data[i + 8]; + if ((Data[i + 3] & 0xF0) == 0xE0) { // video packet + // skip PES header + int offs = i + 6; + // skip header extension + if ((Data[i + 6] & 0xC0) == 0x80) { + // MPEG-2 PES header + offs += 3; + offs += Data[i + 8]; + len -= 3; + len -= Data[i + 8]; + } + else { + // MPEG-1 PES header + while (offs < Length && len > 0 && Data[offs] == 0xFF) { + offs++; + len--; + } + if ((Data[offs] & 0xC0) == 0x40) { + offs += 2; + len -= 2; + } + if ((Data[offs] & 0xF0) == 0x20) { + offs += 5; + len -= 5; + } + else if ((Data[offs] & 0xF0) == 0x30) { + offs += 10; + len -= 10; + } + else if (Data[offs] == 0x0F) { + offs++; + len--; + } + } + if (blen + len > Length) // invalid PES length field + break; + memcpy(&buf[blen], &Data[offs], len); + i = offs + len; + blen += len; } - memcpy(&buf[blen], &Data[offs], len); - i = offs + len; - blen += len; + else if (Data[i + 3] >= 0xBD && Data[i + 3] <= 0xDF) // other PES packets + i += len + 6; + else + i++; } else i++; diff --git a/dvbdevice.h b/dvbdevice.h index aab20fd..78df221 100644 --- a/dvbdevice.h +++ b/dvbdevice.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.h 1.22 2003/08/15 12:34:55 kls Exp $ + * $Id: dvbdevice.h 1.23 2003/10/04 11:54:50 kls Exp $ */ #ifndef __DVBDEVICE_H @@ -73,6 +73,9 @@ protected: // Image Grab facilities +private: + static int devVideoOffset; + int devVideoIndex; public: virtual bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1); diff --git a/dvbspu.c b/dvbspu.c index 27e0bed..74ace19 100644 --- a/dvbspu.c +++ b/dvbspu.c @@ -8,7 +8,7 @@ * * parts of this file are derived from the OMS program. * - * $Id: dvbspu.c 1.4 2003/08/15 13:04:39 kls Exp $ + * $Id: dvbspu.c 1.5 2003/10/12 09:43:18 kls Exp $ */ #include @@ -297,6 +297,10 @@ void cDvbSpuDecoder::clearHighlight(void) { clean &= !highlight; highlight = false; + hlpsize.x1 = -1; + hlpsize.y1 = -1; + hlpsize.x2 = -1; + hlpsize.y2 = -1; } int cDvbSpuDecoder::ScaleYcoord(int value) diff --git a/eit.c b/eit.c index 99eb405..8e0ade7 100644 --- a/eit.c +++ b/eit.c @@ -16,7 +16,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: eit.c 1.79 2003/05/29 15:04:10 kls Exp $ + * $Id: eit.c 1.80 2003/10/12 11:05:42 kls Exp $ ***************************************************************************/ #include "eit.h" @@ -1166,7 +1166,6 @@ void cSIProcessor::SetStatus(bool On) { AddFilter(0x00, 0x00); // PAT AddFilter(0x14, 0x70); // TDT - AddFilter(0x14, 0x73); // TOT AddFilter(0x12, 0x4e, 0xfe); // event info, actual(0x4e)/other(0x4f) TS, present/following AddFilter(0x12, 0x50, 0xfe); // event info, actual TS, schedule(0x50)/schedule for another 4 days(0x51) AddFilter(0x12, 0x60, 0xfe); // event info, other TS, schedule(0x60)/schedule for another 4 days(0x61) @@ -1301,10 +1300,6 @@ void cSIProcessor::Action() ctdt.SetSystemTime(); } } - /*XXX this comes pretty often: - else - dsyslog("Time packet was not 0x70 but 0x%02x\n", (int)buf[0]); - XXX*/ break; case 0x12: diff --git a/interface.c b/interface.c index 6431f91..cff0774 100644 --- a/interface.c +++ b/interface.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.c 1.64 2003/04/27 12:08:52 kls Exp $ + * $Id: interface.c 1.65 2003/10/05 09:48:13 kls Exp $ */ #include "interface.h" @@ -329,7 +329,7 @@ void cInterface::Help(const char *Red, const char *Green, const char *Yellow, co cStatus::MsgOsdHelpKeys(Red, Green, Yellow, Blue); } -void cInterface::QueryKeys(cRemote *Remote) +bool cInterface::QueryKeys(cRemote *Remote) { WriteText(1, 3, tr("Phase 1: Detecting RC code type")); WriteText(1, 5, tr("Press any key on the RC unit")); @@ -372,7 +372,7 @@ void cInterface::QueryKeys(cRemote *Remote) Key = cRemote::Get(100); if (Key == kUp) { Clear(); - return; + return true; } else if (Key == kDown) { ClearEol(0, 6); @@ -406,7 +406,9 @@ void cInterface::QueryKeys(cRemote *Remote) else ClearEol(0, 9); } + return true; } + return false; } void cInterface::LearnKeys(void) @@ -426,9 +428,13 @@ void cInterface::LearnKeys(void) cRemote::Clear(); WriteText(1, 1, Headline); cRemote::SetLearning(Remote); - QueryKeys(Remote); + bool rc = QueryKeys(Remote); cRemote::SetLearning(NULL); Clear(); + if (!rc) { + Close(); + return; + } WriteText(1, 1, Headline); WriteText(1, 3, tr("Phase 3: Saving key codes")); WriteText(1, 5, tr("Press 'Up' to save, 'Down' to cancel")); diff --git a/interface.h b/interface.h index e78b9eb..bcc29df 100644 --- a/interface.h +++ b/interface.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.h 1.29 2002/11/30 14:37:04 kls Exp $ + * $Id: interface.h 1.30 2003/10/05 09:42:53 kls Exp $ */ #ifndef __INTERFACE_H @@ -24,7 +24,7 @@ private: int cols[MaxCols]; bool interrupted; cSVDRP *SVDRP; - void QueryKeys(cRemote *Remote); + bool QueryKeys(cRemote *Remote); void HelpButton(int Index, const char *Text, eDvbColor FgColor, eDvbColor BgColor); eKeys Wait(int Seconds = 0, bool KeepChar = false); public: diff --git a/menu.c b/menu.c index 9f8dea4..72683c0 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.272 2003/09/14 10:49:28 kls Exp $ + * $Id: menu.c 1.273 2003/10/03 14:36:20 kls Exp $ */ #include "menu.h" @@ -2823,6 +2823,7 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key) case kChanUp: case kChanDn|k_Repeat: case kChanDn: + withInfo = true; group = -1; Refresh(); break; diff --git a/recording.c b/recording.c index 6d01ffa..b6e47c5 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 1.83 2003/09/09 16:02:55 kls Exp $ + * $Id: recording.c 1.84 2003/10/17 14:36:58 kls Exp $ */ #include "recording.h" @@ -124,7 +124,7 @@ void AssertFreeDiskSpace(int Priority) cRecording *r = Recordings.First(); cRecording *r0 = NULL; while (r) { - if (r->lifetime < MAXLIFETIME) { // recordings with MAXLIFETIME live forever + if (!r->IsEdited() && r->lifetime < MAXLIFETIME) { // edited recordings and recordings with MAXLIFETIME live forever if ((r->lifetime == 0 && Priority > r->priority) || // the recording has no guaranteed lifetime and the new recording has higher priority (time(NULL) - r->start) / SECSINDAY > r->lifetime) { // the recording's guaranteed lifetime has expired if (r0) { @@ -559,6 +559,13 @@ int cRecording::HierarchyLevels(void) return level; } +bool cRecording::IsEdited(void) +{ + const char *s = strrchr(name, '~'); + s = !s ? name : s + 1; + return *s == '%'; +} + bool cRecording::WriteSummary(void) { if (summary) { diff --git a/recording.h b/recording.h index 42fc1a2..59a9dca 100644 --- a/recording.h +++ b/recording.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.h 1.27 2003/09/09 16:00:56 kls Exp $ + * $Id: recording.h 1.28 2003/10/17 14:27:36 kls Exp $ */ #ifndef __RECORDING_H @@ -58,6 +58,7 @@ public: const char *PrefixFileName(char Prefix); int HierarchyLevels(void); bool IsNew(void) { return GetResume() <= 0; } + bool IsEdited(void); bool WriteSummary(void); bool Delete(void); // Changes the file name so that it will no longer be visible in the "Recordings" menu diff --git a/timers.c b/timers.c index 1542942..a4ab3c1 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.5 2003/05/11 13:48:49 kls Exp $ + * $Id: timers.c 1.6 2003/10/12 10:33:09 kls Exp $ */ #include "timers.h" @@ -217,7 +217,7 @@ bool cTimer::Parse(const char *s) strreplace(file, '|', ':'); strreplace(summary, '|', '\n'); tChannelID cid = tChannelID::FromString(channelbuffer); - channel = cid.Valid() ? Channels.GetByChannelID(cid) : Channels.GetByNumber(atoi(channelbuffer)); + channel = cid.Valid() ? Channels.GetByChannelID(cid, true) : Channels.GetByNumber(atoi(channelbuffer)); if (!channel) { esyslog("ERROR: channel %s not defined", channelbuffer); result = false; -- cgit v1.2.3