cNonBlockingFileReader Class Reference

Inheritance diagram for cNonBlockingFileReader:

Inheritance graph
[legend]
Collaboration diagram for cNonBlockingFileReader:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cNonBlockingFileReader (void)
 ~cNonBlockingFileReader ()
void Clear (void)
int Read (cUnbufferedFile *File, uchar *Buffer, int Length)
bool Reading (void)
bool WaitForDataMs (int msToWait)

Protected Member Functions

void Action (void)

Private Attributes

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


Detailed Description

Definition at line 75 of file dvbplayer.c.


Constructor & Destructor Documentation

cNonBlockingFileReader::cNonBlockingFileReader ( void   ) 

Definition at line 96 of file dvbplayer.c.

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

Here is the call graph for this function:

cNonBlockingFileReader::~cNonBlockingFileReader (  ) 

Definition at line 106 of file dvbplayer.c.

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

Here is the call graph for this function:


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 148 of file dvbplayer.c.

References cCondVar::Broadcast(), buffer, f, FATALERRNO, hasData, length, cThread::Lock(), LOG_ERROR, newDataCond, newDataMutex, newSet, cUnbufferedFile::Read(), cThread::Running(), cThread::Unlock(), cCondWait::Wait(), and wanted.

Here is the call graph for this function:

void cNonBlockingFileReader::Clear ( void   ) 

Definition at line 113 of file dvbplayer.c.

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

Referenced by cDvbPlayer::Empty().

Here is the call graph for this function:

int cNonBlockingFileReader::Read ( cUnbufferedFile File,
uchar Buffer,
int  Length 
)

Definition at line 125 of file dvbplayer.c.

References buffer, esyslog, f, hasData, length, newSet, cCondWait::Signal(), and wanted.

Referenced by cDvbPlayer::Action().

Here is the call graph for this function:

bool cNonBlockingFileReader::Reading ( void   )  [inline]

Definition at line 92 of file dvbplayer.c.

Referenced by cDvbPlayer::Action().

bool cNonBlockingFileReader::WaitForDataMs ( int  msToWait  ) 

Definition at line 173 of file dvbplayer.c.

References hasData, newDataCond, newDataMutex, and cCondVar::TimedWait().

Referenced by cDvbPlayer::Action().

Here is the call graph for this function:


Member Data Documentation

cUnbufferedFile* cNonBlockingFileReader::f [private]

Definition at line 77 of file dvbplayer.c.

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

uchar* cNonBlockingFileReader::buffer [private]

Definition at line 78 of file dvbplayer.c.

Referenced by Action(), Clear(), cNonBlockingFileReader(), Read(), and ~cNonBlockingFileReader().

int cNonBlockingFileReader::wanted [private]

Definition at line 79 of file dvbplayer.c.

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

int cNonBlockingFileReader::length [private]

Definition at line 80 of file dvbplayer.c.

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

bool cNonBlockingFileReader::hasData [private]

Definition at line 81 of file dvbplayer.c.

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

cCondWait cNonBlockingFileReader::newSet [private]

Definition at line 82 of file dvbplayer.c.

Referenced by Action(), Clear(), Read(), and ~cNonBlockingFileReader().

cCondVar cNonBlockingFileReader::newDataCond [private]

Definition at line 83 of file dvbplayer.c.

Referenced by Action(), and WaitForDataMs().

cMutex cNonBlockingFileReader::newDataMutex [private]

Definition at line 84 of file dvbplayer.c.

Referenced by Action(), and WaitForDataMs().


The documentation for this class was generated from the following file:
Generated on Tue Nov 6 20:20:53 2007 for VDR by  doxygen 1.5.3-20071008