vdr  1.7.27
Public Member Functions | Protected Member Functions | Private Attributes
cNonBlockingFileReader Class Reference

List of all members.

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)

Protected Member Functions

void Action (void)

Private Attributes

cUnbufferedFilef
ucharbuffer
int wanted
int length
cCondWait newSet
cCondVar newDataCond
cMutex newDataMutex

Detailed Description

Definition at line 86 of file dvbplayer.c.


Constructor & Destructor Documentation

Definition at line 107 of file dvbplayer.c.

References buffer, f, length, cThread::Start(), and wanted.

Definition at line 116 of file dvbplayer.c.

References buffer, cThread::Cancel(), newSet, and cCondWait::Signal().


Member Function Documentation

void cNonBlockingFileReader::Action ( void  ) [protected, virtual]

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 156 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.

Definition at line 123 of file dvbplayer.c.

References buffer, f, length, cThread::Lock(), cThread::Unlock(), and wanted.

Referenced by cDvbPlayer::Empty(), and Request().

bool cNonBlockingFileReader::Reading ( void  ) [inline]

Definition at line 103 of file dvbplayer.c.

References buffer.

Referenced by cDvbPlayer::Action().

void cNonBlockingFileReader::Request ( cUnbufferedFile File,
int  Length 
)

Definition at line 133 of file dvbplayer.c.

References buffer, Clear(), f, cThread::Lock(), MALLOC, newSet, cCondWait::Signal(), cThread::Unlock(), and wanted.

Referenced by cDvbPlayer::Action().

Definition at line 144 of file dvbplayer.c.

References buffer, length, LOCK_THREAD, and wanted.

Referenced by cDvbPlayer::Action().

bool cNonBlockingFileReader::WaitForDataMs ( int  msToWait)

Definition at line 184 of file dvbplayer.c.

References buffer, length, newDataCond, newDataMutex, cCondVar::TimedWait(), and wanted.

Referenced by cDvbPlayer::Action().


Member Data Documentation

Definition at line 88 of file dvbplayer.c.

Referenced by Action(), Clear(), cNonBlockingFileReader(), and Request().

Definition at line 91 of file dvbplayer.c.

Referenced by Action(), Clear(), cNonBlockingFileReader(), Result(), and WaitForDataMs().

Definition at line 93 of file dvbplayer.c.

Referenced by Action(), and WaitForDataMs().

Definition at line 94 of file dvbplayer.c.

Referenced by Action(), and WaitForDataMs().

Definition at line 92 of file dvbplayer.c.

Referenced by Action(), Request(), and ~cNonBlockingFileReader().

Definition at line 90 of file dvbplayer.c.

Referenced by Action(), Clear(), cNonBlockingFileReader(), Request(), Result(), and WaitForDataMs().


The documentation for this class was generated from the following file: