vdr
2.2.0
|
Public Member Functions | |
cNonBlockingFileReader (void) | |
~cNonBlockingFileReader () | |
void | Clear (void) |
void | Request (cUnbufferedFile *File, int Length) |
int | Result (uchar **Buffer) |
bool | Reading (void) |
bool | WaitForDataMs (int msToWait) |
![]() | |
cThread (const char *Description=NULL, bool LowPriority=false) | |
virtual | ~cThread () |
void | SetDescription (const char *Description,...) __attribute__((format(printf |
void bool | Start (void) |
bool | Active (void) |
Protected Member Functions | |
void | Action (void) |
![]() | |
void | SetPriority (int Priority) |
void | SetIOPriority (int Priority) |
void | Lock (void) |
void | Unlock (void) |
bool | Running (void) |
void | Cancel (int WaitSeconds=0) |
Private Attributes | |
cUnbufferedFile * | f |
uchar * | buffer |
int | wanted |
int | length |
cCondWait | newSet |
cCondVar | newDataCond |
cMutex | newDataMutex |
Additional Inherited Members | |
![]() | |
static tThreadId | ThreadId (void) |
static tThreadId | IsMainThread (void) |
static void | SetMainThreadId (void) |
Definition at line 92 of file dvbplayer.c.
cNonBlockingFileReader::cNonBlockingFileReader | ( | void | ) |
Definition at line 113 of file dvbplayer.c.
References buffer, f, length, cThread::Start(), and wanted.
cNonBlockingFileReader::~cNonBlockingFileReader | ( | ) |
Definition at line 122 of file dvbplayer.c.
References buffer, cThread::Cancel(), newSet, and cCondWait::Signal().
|
protectedvirtual |
A derived cThread class must implement the code it wants to execute as a separate thread in this function.
If this is a loop, it must check Running() repeatedly to see whether it's time to stop.
Implements cThread.
Definition at line 162 of file dvbplayer.c.
References cCondVar::Broadcast(), buffer, f, FATALERRNO, length, cThread::Lock(), LOG_ERROR, newDataCond, newDataMutex, newSet, cUnbufferedFile::Read(), cThread::Running(), cThread::Unlock(), cCondWait::Wait(), and wanted.
void cNonBlockingFileReader::Clear | ( | void | ) |
Definition at line 129 of file dvbplayer.c.
References buffer, f, length, cThread::Lock(), cThread::Unlock(), and wanted.
Referenced by cDvbPlayer::Empty(), and Request().
|
inline |
Definition at line 109 of file dvbplayer.c.
Referenced by cDvbPlayer::Action().
void cNonBlockingFileReader::Request | ( | cUnbufferedFile * | File, |
int | Length | ||
) |
Definition at line 139 of file dvbplayer.c.
References buffer, Clear(), f, cThread::Lock(), MALLOC, newSet, cCondWait::Signal(), cThread::Unlock(), and wanted.
Referenced by cDvbPlayer::Action().
int cNonBlockingFileReader::Result | ( | uchar ** | Buffer | ) |
Definition at line 150 of file dvbplayer.c.
References buffer, length, LOCK_THREAD, and wanted.
Referenced by cDvbPlayer::Action().
bool cNonBlockingFileReader::WaitForDataMs | ( | int | msToWait | ) |
Definition at line 190 of file dvbplayer.c.
References buffer, length, newDataCond, newDataMutex, cCondVar::TimedWait(), and wanted.
Referenced by cDvbPlayer::Action().
|
private |
Definition at line 95 of file dvbplayer.c.
Referenced by Action(), Clear(), cNonBlockingFileReader(), Request(), Result(), WaitForDataMs(), and ~cNonBlockingFileReader().
|
private |
Definition at line 94 of file dvbplayer.c.
Referenced by Action(), Clear(), cNonBlockingFileReader(), and Request().
|
private |
Definition at line 97 of file dvbplayer.c.
Referenced by Action(), Clear(), cNonBlockingFileReader(), Result(), and WaitForDataMs().
|
private |
Definition at line 99 of file dvbplayer.c.
Referenced by Action(), and WaitForDataMs().
|
private |
Definition at line 100 of file dvbplayer.c.
Referenced by Action(), and WaitForDataMs().
|
private |
Definition at line 98 of file dvbplayer.c.
Referenced by Action(), Request(), and ~cNonBlockingFileReader().
|
private |
Definition at line 96 of file dvbplayer.c.
Referenced by Action(), Clear(), cNonBlockingFileReader(), Request(), Result(), and WaitForDataMs().