vdr  2.2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cRingBufferFrame Class Reference

#include <ringbuffer.h>

Public Member Functions

 cRingBufferFrame (int Size, bool Statistics=false)
 
virtual ~cRingBufferFrame ()
 
virtual int Available (void)
 
virtual void Clear (void)
 
bool Put (cFrame *Frame)
 
cFrameGet (void)
 
void Drop (cFrame *Frame)
 
- Public Member Functions inherited from cRingBuffer
 cRingBuffer (int Size, bool Statistics=false)
 
virtual ~cRingBuffer ()
 
void SetTimeouts (int PutTimeout, int GetTimeout)
 
void SetIoThrottle (void)
 
void ReportOverflow (int Bytes)
 

Private Member Functions

void Delete (cFrame *Frame)
 
void Lock (void)
 
void Unlock (void)
 

Private Attributes

cMutex mutex
 
cFramehead
 
int currentFill
 

Additional Inherited Members

- Protected Member Functions inherited from cRingBuffer
void UpdatePercentage (int Fill)
 
void WaitForPut (void)
 
void WaitForGet (void)
 
void EnablePut (void)
 
void EnableGet (void)
 
virtual int Free (void)
 
int Size (void)
 
- Protected Attributes inherited from cRingBuffer
tThreadId getThreadTid
 
int maxFill
 
int lastPercent
 
bool statistics
 

Detailed Description

Definition at line 129 of file ringbuffer.h.

Constructor & Destructor Documentation

cRingBufferFrame::cRingBufferFrame ( int  Size,
bool  Statistics = false 
)

Definition at line 418 of file ringbuffer.c.

References currentFill, and head.

cRingBufferFrame::~cRingBufferFrame ( )
virtual

Definition at line 425 of file ringbuffer.c.

References Clear().

Member Function Documentation

int cRingBufferFrame::Available ( void  )
virtual

Implements cRingBuffer.

Definition at line 496 of file ringbuffer.c.

References currentFill, Lock(), and Unlock().

void cRingBufferFrame::Clear ( void  )
virtual

Implements cRingBuffer.

Definition at line 430 of file ringbuffer.c.

References Drop(), cRingBuffer::EnableGet(), cRingBuffer::EnablePut(), Get(), Lock(), and Unlock().

Referenced by cDvbPlayer::Empty(), and ~cRingBufferFrame().

void cRingBufferFrame::Delete ( cFrame Frame)
private

Definition at line 469 of file ringbuffer.c.

References cFrame::Count(), and currentFill.

Referenced by Drop().

void cRingBufferFrame::Drop ( cFrame Frame)

Definition at line 475 of file ringbuffer.c.

References Delete(), cRingBuffer::EnablePut(), esyslog, head, Lock(), cFrame::next, and Unlock().

Referenced by cDvbPlayer::Action(), and Clear().

cFrame * cRingBufferFrame::Get ( void  )

Definition at line 461 of file ringbuffer.c.

References head, Lock(), cFrame::next, and Unlock().

Referenced by cDvbPlayer::Action(), and Clear().

void cRingBufferFrame::Lock ( void  )
inlineprivate

Definition at line 135 of file ringbuffer.h.

References cMutex::Lock().

Referenced by Available(), Clear(), Drop(), Get(), and Put().

bool cRingBufferFrame::Put ( cFrame Frame)
void cRingBufferFrame::Unlock ( void  )
inlineprivate

Member Data Documentation

int cRingBufferFrame::currentFill
private

Definition at line 133 of file ringbuffer.h.

Referenced by Available(), cRingBufferFrame(), Delete(), and Put().

cFrame* cRingBufferFrame::head
private

Definition at line 132 of file ringbuffer.h.

Referenced by cRingBufferFrame(), Drop(), Get(), and Put().

cMutex cRingBufferFrame::mutex
private

Definition at line 131 of file ringbuffer.h.


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