summaryrefslogtreecommitdiff
path: root/recorder.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-10-31 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-10-31 18:00:00 +0100
commit99e3c093f404b55683a90e38bbe74e1f51c35316 (patch)
treeed19caa03a60230d65a210a213d35bf62ed9f55f /recorder.c
parent88d8d634089bae65bdfea8238a847b7883058072 (diff)
downloadvdr-patch-lnbsharing-99e3c093f404b55683a90e38bbe74e1f51c35316.tar.gz
vdr-patch-lnbsharing-99e3c093f404b55683a90e38bbe74e1f51c35316.tar.bz2
Version 1.3.35vdr-1.3.35
- Updated 'sources.conf' (thanks to Philip Prindeville). - Now using daemon() instead of fork() to run VDR in daemon mode (thanks to Enrico Scholz). - Fixed a possible endless loop in a menu with no selectable items if Setup.MenuScrollWrap is true (thanks to Enrico Scholz). - Making sure no item is displayed as "current" if Up, Down, Left or Right is pressed in a menu with no selectable items. - Added '__attribute__' to functions that use printf() like parameters (thanks to Darren Salt). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Fixed a leftover 'summary.vdr' in vdr.1 (reported by Christoph Hermanns). - Added more error messages and line numbers when reading EPG data and info.vdr (thanks to Peter Bieringer). - Updated the Danish OSD texts (thanks to Mogens Elneff). - Updated the Estonian OSD texts (thanks to Arthur Konovalov). - Added missing mutex locks to cCiMenu::Abort() and cCiEnquiry::Abort() (reported by Marco Schlüßler). - Fixed lock handling in CAM communication to avoid problems with multiple CAMs per device or CAMs with more than one smart card. - Updated the Greek OSD texts (thanks to Dimitrios Dimitrakos). - Updated the French OSD texts (thanks to Nicolas Huillard). - Fixed the cFilter example in PLUGINS.html (reported by Patrick Fischer). - The new class cUnbufferedFile is used for the recording files to avoid trashing the file system cache (based on a patch by Ralf Müller).
Diffstat (limited to 'recorder.c')
-rw-r--r--recorder.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/recorder.c b/recorder.c
index 34236fc..35a8e56 100644
--- a/recorder.c
+++ b/recorder.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recorder.c 1.15 2005/08/14 10:53:28 kls Exp $
+ * $Id: recorder.c 1.16 2005/10/31 12:35:29 kls Exp $
*/
#include <stdarg.h>
@@ -28,7 +28,7 @@ private:
cIndexFile *index;
uchar pictureType;
int fileSize;
- int recordFile;
+ cUnbufferedFile *recordFile;
time_t lastDiskSpaceCheck;
bool RunningLowOnDiskSpace(void);
bool NextFile(void);
@@ -50,7 +50,7 @@ cFileWriter::cFileWriter(const char *FileName, cRemux *Remux)
lastDiskSpaceCheck = time(NULL);
fileName = new cFileName(FileName, true);
recordFile = fileName->Open();
- if (recordFile < 0)
+ if (!recordFile)
return;
// Create the index file:
index = new cIndexFile(FileName, true);
@@ -81,13 +81,13 @@ bool cFileWriter::RunningLowOnDiskSpace(void)
bool cFileWriter::NextFile(void)
{
- if (recordFile >= 0 && pictureType == I_FRAME) { // every file shall start with an I_FRAME
+ if (recordFile && pictureType == I_FRAME) { // every file shall start with an I_FRAME
if (fileSize > MEGABYTE(Setup.MaxVideoFileSize) || RunningLowOnDiskSpace()) {
recordFile = fileName->NextFile();
fileSize = 0;
}
}
- return recordFile >= 0;
+ return recordFile != NULL;
}
void cFileWriter::Action(void)
@@ -102,7 +102,7 @@ void cFileWriter::Action(void)
if (NextFile()) {
if (index && pictureType != NO_PICTURE)
index->Write(pictureType, fileName->Number(), fileSize);
- if (safe_write(recordFile, p, Count) < 0) {
+ if (recordFile->Write(p, Count) < 0) {
LOG_ERROR_STR(fileName->Name());
break;
}