|
vdr
2.2.0
|
#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 1731 of file tools.c.
References fd, and totwritten.
Referenced by cFileName::Close(), Open(), and ~cUnbufferedFile().
|
static |
Definition at line 1883 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 1774 of file tools.c.
References ahead, cachedend, cachedstart, curpos, FadviseDrop(), fd, lastpos, max(), min(), readahead, READCHUNK, and safe_read().
Referenced by cNonBlockingFileReader::Action(), cRingBufferLinear::Read(), and ReadFrame().
| off_t cUnbufferedFile::Seek | ( | off_t | Offset, |
| int | Whence | ||
| ) |
Definition at line 1766 of file tools.c.
Referenced by cFileName::SetOffset().
| void cUnbufferedFile::SetReadAhead | ( | size_t | ra | ) |
Definition at line 1755 of file tools.c.
References readahead.
Referenced by cCuttingThread::LoadFrame().
| ssize_t cUnbufferedFile::Write | ( | const void * | Data, |
| size_t | Size | ||
| ) |
Definition at line 1832 of file tools.c.
References begin, curpos, fd, lastpos, max(), MEGABYTE, min(), safe_write(), totwritten, WRITE_BUFFER, and written.
Referenced by cRecorder::Action(), and cCuttingThread::ProcessSequence().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 420 of file tools.h.
Referenced by Close(), cUnbufferedFile(), FadviseDrop(), Open(), Read(), Seek(), and Write().
|
private |
|
private |
Definition at line 427 of file tools.h.
Referenced by Open(), Read(), and SetReadAhead().
|
private |
|
private |
1.8.6