cTSBuffer Class Reference

#include <device.h>

Inheritance diagram for cTSBuffer:

Inheritance graph
[legend]
Collaboration diagram for cTSBuffer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cTSBuffer (int File, int Size, int CardIndex)
 ~cTSBuffer ()
ucharGet (void)

Private Member Functions

virtual void Action (void)

Private Attributes

int f
int cardIndex
bool delivered
cRingBufferLinearringBuffer


Detailed Description

Derived cDevice classes that can receive channels will have to provide Transport Stream (TS) packets one at a time. cTSBuffer implements a simple buffer that allows the device to read a larger amount of data from the driver with each call to Read(), thus avoiding the overhead of getting each TS packet separately from the driver. It also makes sure the returned data points to a TS packet and automatically re-synchronizes after broken packets.

Definition at line 555 of file device.h.


Constructor & Destructor Documentation

cTSBuffer::cTSBuffer ( int  File,
int  Size,
int  CardIndex 
)

Definition at line 1318 of file device.c.

References cardIndex, delivered, f, ringBuffer, cThread::SetDescription(), cRingBuffer::SetTimeouts(), cThread::Start(), and TS_SIZE.

Here is the call graph for this function:

cTSBuffer::~cTSBuffer (  ) 

Definition at line 1329 of file device.c.

References cThread::Cancel(), and ringBuffer.

Here is the call graph for this function:


Member Function Documentation

void cTSBuffer::Action ( void   )  [private, 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 1335 of file device.c.

References cardIndex, esyslog, f, FATALERRNO, LOG_ERROR, cPoller::Poll(), cRingBufferLinear::Read(), ringBuffer, and cThread::Running().

Here is the call graph for this function:

uchar * cTSBuffer::Get ( void   ) 

Definition at line 1357 of file device.c.

References cardIndex, cRingBufferLinear::Del(), delivered, esyslog, cRingBufferLinear::Get(), ringBuffer, TS_SIZE, and TS_SYNC_BYTE.

Referenced by cDigiboxDevice::GetTSPacket(), and cDvbDevice::GetTSPacket().

Here is the call graph for this function:


Member Data Documentation

int cTSBuffer::f [private]

Definition at line 557 of file device.h.

Referenced by Action(), and cTSBuffer().

int cTSBuffer::cardIndex [private]

Definition at line 558 of file device.h.

Referenced by Action(), cTSBuffer(), and Get().

bool cTSBuffer::delivered [private]

Definition at line 559 of file device.h.

Referenced by cTSBuffer(), and Get().

cRingBufferLinear* cTSBuffer::ringBuffer [private]

Definition at line 560 of file device.h.

Referenced by Action(), cTSBuffer(), Get(), and ~cTSBuffer().


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