mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 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).
This commit is contained in:
25
tools.h
25
tools.h
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: tools.h 1.79 2005/10/01 12:43:31 kls Exp $
|
||||
* $Id: tools.h 1.81 2005/10/31 12:54:36 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TOOLS_H
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
operator const char * () const { return s; } // for use in (const char *) context
|
||||
const char * operator*() const { return s; } // for use in (const void *) context (printf() etc.)
|
||||
cString &operator=(const cString &String);
|
||||
static cString sprintf(const char *fmt, ...);
|
||||
static cString sprintf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
};
|
||||
|
||||
ssize_t safe_read(int filedes, void *buffer, size_t size);
|
||||
@@ -198,6 +198,27 @@ public:
|
||||
bool Close(void);
|
||||
};
|
||||
|
||||
/// cUnbufferedFile is used for large files that are mainly written or read
|
||||
/// in a streaming manner, and thus should not be cached.
|
||||
|
||||
class cUnbufferedFile {
|
||||
private:
|
||||
int fd;
|
||||
off_t begin;
|
||||
off_t end;
|
||||
off_t ahead;
|
||||
ssize_t written;
|
||||
public:
|
||||
cUnbufferedFile(void);
|
||||
~cUnbufferedFile();
|
||||
int Open(const char *FileName, int Flags, mode_t Mode = DEFFILEMODE);
|
||||
int Close(void);
|
||||
off_t Seek(off_t Offset, int Whence);
|
||||
ssize_t Read(void *Data, size_t Size);
|
||||
ssize_t Write(const void *Data, size_t Size);
|
||||
static cUnbufferedFile *Create(const char *FileName, int Flags, mode_t Mode = DEFFILEMODE);
|
||||
};
|
||||
|
||||
class cLockFile {
|
||||
private:
|
||||
char *fileName;
|
||||
|
||||
Reference in New Issue
Block a user