Home

Dokumentation

Impressum

Dokumentation VDR
 

Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

cTSBuffer Class Reference

#include <device.h>


Detailed Description

Buffer implementation for transport stream.

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

Definition at line 612 of file device.h.

Public Methods

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

Private Methods

int Used (void)

Private Attributes

int f
int size
int cardIndex
int tsRead
int tsWrite
ucharbuf
bool firstRead


Constructor & Destructor Documentation

cTSBuffer::cTSBuffer int    File,
int    Size,
int    CardIndex
 

Definition at line 728 of file device.c.

References buf, cardIndex, f, firstRead, MALLOC, size, tsRead, and tsWrite.

cTSBuffer::~cTSBuffer  
 

Definition at line 739 of file device.c.


Member Function Documentation

uchar * cTSBuffer::Get void   
 

Definition at line 777 of file device.c.

References buf, esyslog, size, tsRead, tsWrite, uchar, and Used().

Referenced by cDvbDevice::GetTSPacket().

int cTSBuffer::Read void   
 

Definition at line 744 of file device.c.

References firstRead, cPoller::Poll(), size, tsRead, tsWrite, and Used().

Referenced by cDvbDevice::GetTSPacket().

int cTSBuffer::Used void    [inline, private]
 

Definition at line 621 of file device.h.

Referenced by Get(), and Read().


Field Documentation

uchar* cTSBuffer::buf [private]
 

Definition at line 619 of file device.h.

Referenced by cTSBuffer(), and Get().

int cTSBuffer::cardIndex [private]
 

Definition at line 616 of file device.h.

Referenced by cTSBuffer().

int cTSBuffer::f [private]
 

Definition at line 614 of file device.h.

Referenced by cTSBuffer().

bool cTSBuffer::firstRead [private]
 

Definition at line 620 of file device.h.

Referenced by cTSBuffer(), and Read().

int cTSBuffer::size [private]
 

Definition at line 615 of file device.h.

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

int cTSBuffer::tsRead [private]
 

Definition at line 617 of file device.h.

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

int cTSBuffer::tsWrite [private]
 

Definition at line 618 of file device.h.

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


The documentation for this class was generated from the following files:
Generated on Wed Feb 5 23:32:01 2003 for VDR by doxygen1.3-rc2