|
vdr 2.8.1
|
#include <tools.h>
Public Member Functions | |
| cUnbufferedFile (void) | |
| ~cUnbufferedFile () | |
| int | Open (const char *FileName, int Flags, mode_t Mode=DEFFILEMODE) |
| int | Close (void) |
| void | SetReadAhead (size_t ra) |
| 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 Public Member Functions | |
| static cUnbufferedFile * | Create (const char *FileName, int Flags, mode_t Mode=DEFFILEMODE) |
Private Member Functions | |
| int | FadviseDrop (off_t Offset, off_t Len) |
Private Attributes | |
| int | fd |
| off_t | curpos |
| off_t | cachedstart |
| off_t | cachedend |
| off_t | begin |
| off_t | lastpos |
| off_t | ahead |
| size_t | readahead |
| size_t | written |
| size_t | totwritten |
cUnbufferedFile is used for large files that are mainly written or read in a streaming manner, and thus should not be cached.
| cUnbufferedFile::cUnbufferedFile | ( | void | ) |
| int cUnbufferedFile::Close | ( | void | ) |
Definition at line 1852 of file tools.c.
References fd, and totwritten.
Referenced by Open(), and ~cUnbufferedFile().
|
static |
Definition at line 2004 of file tools.c.
References cUnbufferedFile(), and Open().
Referenced by cFileName::Open(), and cVideoDirectory::OpenVideoFile().
|
private |
| int cUnbufferedFile::Open | ( | const char * | FileName, |
| int | Flags, | ||
| mode_t | Mode = DEFFILEMODE ) |
| ssize_t cUnbufferedFile::Read | ( | void * | Data, |
| size_t | Size ) |
Definition at line 1895 of file tools.c.
References ahead, cachedend, cachedstart, curpos, FadviseDrop(), fd, lastpos, max(), min(), readahead, READCHUNK, and safe_read().
Referenced by cRingBufferLinear::Read(), and ReadFrame().
| off_t cUnbufferedFile::Seek | ( | off_t | Offset, |
| int | Whence ) |
| void cUnbufferedFile::SetReadAhead | ( | size_t | ra | ) |
| ssize_t cUnbufferedFile::Write | ( | const void * | Data, |
| size_t | Size ) |
Definition at line 1953 of file tools.c.
References begin, curpos, fd, lastpos, max(), MEGABYTE, min(), safe_write(), totwritten, WRITE_BUFFER, and written.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 509 of file tools.h.
Referenced by Close(), cUnbufferedFile(), FadviseDrop(), Open(), Read(), Seek(), and Write().
|
private |
|
private |
Definition at line 516 of file tools.h.
Referenced by Open(), Read(), and SetReadAhead().
|
private |
|
private |