diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2003-04-13 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2003-04-13 18:00:00 +0200 |
commit | 9f919801465f49be6b2118f54bd54df846e2f865 (patch) | |
tree | 721f42c9fd88ab33b47ad9b945247353bac9bc4c /recording.c | |
parent | b60eda5a8e8a9b9b96a90016fd27c03cd3f1ec8b (diff) | |
download | vdr-patch-lnbsharing-9f919801465f49be6b2118f54bd54df846e2f865.tar.gz vdr-patch-lnbsharing-9f919801465f49be6b2118f54bd54df846e2f865.tar.bz2 |
Version 1.1.27vdr-1.1.27
- The CAM is now accessed only if the current channel actually has a non-zero Ca
value, and CAM access is completely suppressed during replay, which avoids
problems in case the CAM is attached to the primary DVB device.
- The "Left" and "Right" buttons now set the cursor to the first or last list item
even if the list consist only of a single page, like, for instance, the Main menu
(thanks to Oliver Endriss).
- Made the log message "OSD window width must be a multiple of 4..." a debug message
instead of an error message, so it can be avoided by using a log level less than 3.
- Updated Greek language texts (thanks to Dimitrios Dimitrakos).
- Fixed faulty behaviour of the "Mute" key in case the channel display is visible
(thanks to Florian Bartels for reporting this one and Sascha Volkenandt for
helping to fix it).
- Modified LOF handling to allow for C-band reception (thanks to Malcolm Caldwell).
- Added some missing cAudio handling calls (thanks to Werner Fink).
- Replaced the 'for' loops in StripAudioPackets() with memset() calls (thanks to
Werner Fink).
- Further increased the timeout until an index file is considerd no longer to be
written.
- Fixed a crash in case the index file can't be accessed any more during replay
(thanks to Stefan Huelswitt for reporting this one).
- Fixed displaying messages in the status line in case they exceed the OSD width
(thanks to Gerhard Steiner for reporting this one).
- Avoiding high CPU load in case the connection to LIRC gets lost (thanks to
Ludwig Nussel).
- Fixed handling repeat function with LIRC (thanks to Ludwig Nussel).
- Fixed handling min/max borders when entering integer values (thanks to Andy
Grobb for reporting this one).
- Implemented a "resume ID" which allows several users to each have their own
resume.vdr files (thanks to Martin Hammerschmid). This parameter can be set in
the "Setup/Replay" menu (see MANUAL for details).
- Now using 'libdtv' version 0.0.5 (thanks to Rolf Hakenes for the new version
and Stefan Huelswitt for adapting VDR to it).
- If no device with an MPEG decoder can be found at startup, the first device
is now used as primary device (just to have some device).
- Adjusted some Premiere channels in 'channels.conf' (thanks to Thomas Koch).
- Updated 'channels.conf.cable' (thanks to Stefan Hußfeldt).
- The 'epg.data' file is now read after all plugins have been started (thanks
to Sascha Volkenandt).
- The LIRC remote control no longer tries to learn keys if it can't connect to
the LIRC daemon (thanks to Ludwig Nussel for reporting this one). The same
applies to the RCU remote control in case of errors during startup.
- Fixed handling of Ca parameters with values <= MAXDEVICES, which don't indicate
an actual encrypted channel (thanks to Stefan Huelswitt for reporting this one).
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/recording.c b/recording.c index e14bb43..261bee8 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.72 2003/01/06 15:36:12 kls Exp $ + * $Id: recording.c 1.75 2003/04/12 09:51:44 kls Exp $ */ #include "recording.h" @@ -42,7 +42,7 @@ #define NAMEFORMAT "%s/%s/" nameFORMAT // end of implementation for brain dead systems -#define RESUMEFILESUFFIX "/resume.vdr" +#define RESUMEFILESUFFIX "/resume%s%s.vdr" #define SUMMARYFILESUFFIX "/summary.vdr" #define MARKSFILESUFFIX "/marks.vdr" @@ -154,7 +154,7 @@ cResumeFile::cResumeFile(const char *FileName) fileName = MALLOC(char, strlen(FileName) + strlen(RESUMEFILESUFFIX) + 1); if (fileName) { strcpy(fileName, FileName); - strcat(fileName, RESUMEFILESUFFIX); + sprintf(fileName + strlen(fileName), RESUMEFILESUFFIX, Setup.ResumeID ? "." : "", Setup.ResumeID ? itoa(Setup.ResumeID) : ""); } else esyslog("ERROR: can't allocate memory for resume file name"); @@ -768,7 +768,7 @@ void cRecordingUserCommand::InvokeCommand(const char *State, const char *Recordi #define MAXINDEXCATCHUP 2 // seconds // The minimum age of an index file for considering it no longer to be written: -#define MININDEXAGE 60 // seconds +#define MININDEXAGE 300 // seconds cIndexFile::cIndexFile(const char *FileName, bool Record) :resumeFile(FileName) @@ -848,6 +848,7 @@ cIndexFile::~cIndexFile() bool cIndexFile::CatchUp(int Index) { + // returns true unless something really goes wrong, so that 'index' becomes NULL if (index && f >= 0) { for (int i = 0; i <= MAXINDEXCATCHUP && (Index < 0 || Index >= last); i++) { struct stat buf; @@ -856,7 +857,7 @@ bool cIndexFile::CatchUp(int Index) // apparently the index file is not being written any more close(f); f = -1; - return false; + break; } int newLast = buf.st_size / sizeof(tIndex) - 1; if (newLast > last) { @@ -889,13 +890,12 @@ bool cIndexFile::CatchUp(int Index) } else LOG_ERROR_STR(fileName); - if (Index >= last) - sleep(1); - else - return true; + if (Index < last) + break; + sleep(1); } } - return false; + return index != NULL; } bool cIndexFile::Write(uchar PictureType, uchar FileNumber, int FileOffset) @@ -915,8 +915,7 @@ bool cIndexFile::Write(uchar PictureType, uchar FileNumber, int FileOffset) bool cIndexFile::Get(int Index, uchar *FileNumber, int *FileOffset, uchar *PictureType, int *Length) { - if (index) { - CatchUp(Index); + if (CatchUp(Index)) { if (Index >= 0 && Index < last) { *FileNumber = index[Index].number; *FileOffset = index[Index].offset; @@ -938,8 +937,7 @@ bool cIndexFile::Get(int Index, uchar *FileNumber, int *FileOffset, uchar *Pictu int cIndexFile::GetNextIFrame(int Index, bool Forward, uchar *FileNumber, int *FileOffset, int *Length, bool StayOffEnd) { - if (index) { - CatchUp(); + if (CatchUp()) { int d = Forward ? 1 : -1; for (;;) { Index += d; @@ -976,8 +974,7 @@ int cIndexFile::GetNextIFrame(int Index, bool Forward, uchar *FileNumber, int *F int cIndexFile::Get(uchar FileNumber, int FileOffset) { - if (index) { - CatchUp(); + if (CatchUp()) { //TODO implement binary search! int i; for (i = 0; i < last; i++) { |