Home

Dokumentation

Impressum

Dokumentation VDR
 

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

cTransfer Class Reference

#include <transfer.h>

Inheritance diagram for cTransfer:

Inheritance graph
[legend]
Collaboration diagram for cTransfer:

Collaboration graph
[legend]

Detailed Description

Transfer mode.

transfer.h: Transfer mode

See the main source file 'vdr.c' for copyright information and how to reach the author.

Id
transfer.h 1.3 2002/10/12 12:59:05 kls Exp

Definition at line 20 of file transfer.h.

Public Methods

 cTransfer (int VPid, int APid1, int APid2, int DPid1, int DPid2)
virtual ~cTransfer ()
virtual int NumAudioTracks (void) const
virtual const char ** GetAudioTracks (int *CurrentTrack=NULL) const
virtual void SetAudioTrack (int Index)

Protected Methods

virtual void Activate (bool On)
virtual void Receive (uchar *Data, int Length)
virtual void Action (void)

Private Methods

void StripAudioPackets (uchar *b, int Length, uchar Except=0x00)

Private Attributes

cRingBufferLinearringBuffer
cRemuxremux
bool canToggleAudioTrack
uchar audioTrack
bool gotBufferReserve
bool active


Constructor & Destructor Documentation

cTransfer::cTransfer int    VPid,
int    APid1,
int    APid2,
int    DPid1,
int    DPid2
 

Definition at line 19 of file transfer.c.

References active, audioTrack, canToggleAudioTrack, gotBufferReserve, remux, and ringBuffer.

cTransfer::~cTransfer   [virtual]
 

Definition at line 30 of file transfer.c.

References cPlayer::Detach(), cReceiver::Detach(), remux, and ringBuffer.


Member Function Documentation

void cTransfer::Action void    [protected, virtual]
 

Implements cThread.

Definition at line 59 of file transfer.c.

References active, dsyslog, FATALERRNO, cRingBufferLinear::Get(), LOG_ERROR, MINVIDEODATA, cPlayer::PlayVideo(), cRemux::Process(), remux, ringBuffer, StripAudioPackets(), and uchar.

void cTransfer::Activate bool    On [protected, virtual]
 

This function is called right after the cPlayer has been attached to (On == true) or before it gets detached from (On == false) a cDevice. It can be used to do things like starting/stopping a thread.

Reimplemented from cPlayer.

Definition at line 38 of file transfer.c.

References active, cThread::Cancel(), and cThread::Start().

const char ** cTransfer::GetAudioTracks int *    CurrentTrack = NULL const [virtual]
 

Returns a list of currently available audio tracks. The last entry in the list must be NULL. The number of entries does not necessarily have to be the same as returned by a previous call to NumAudioTracks(). If CurrentTrack is given, it will be set to the index of the current track in the returned list. Note that the list must not be changed after it has been returned by a call to GetAudioTracks()! The only time the list may change is *inside* the GetAudioTracks() function. By default the return value is NULL and CurrentTrack, if given, will not have any meaning.

Reimplemented from cPlayer.

Definition at line 160 of file transfer.c.

References audioTrack, and NumAudioTracks().

int cTransfer::NumAudioTracks void    const [virtual]
 

Returns the number of audio tracks that are currently available on this player. The default return value is 0, meaning that this player doesn't have multiple audio track capabilities. The return value may change with every call and need not necessarily be the number of list entries returned by GetAudioTracks(). This function is mainly called to decide whether there should be an "Audio" button in a menu.

Reimplemented from cPlayer.

Definition at line 155 of file transfer.c.

References canToggleAudioTrack.

Referenced by GetAudioTracks().

void cTransfer::Receive uchar   Data,
int    Length
[protected, virtual]
 

This function is called from the cDevice we are attached to, and delivers one TS packet from the set of PIDs the cReceiver has requested. The data packet must be accepted immediately, and the call must return as soon as possible, without any unnecessary delay. Each TS packet will be delivered only ONCE, so the cReceiver must make sure that it will be able to buffer the data if necessary.

Implements cReceiver.

Definition at line 50 of file transfer.c.

References active, esyslog, cPlayer::IsAttached(), cRingBufferLinear::Put(), and ringBuffer.

void cTransfer::SetAudioTrack int    Index [virtual]
 

Sets the current audio track to the given value, which should be within the range of the list returned by a previous call to GetAudioTracks() (otherwise nothing will happen).

Reimplemented from cPlayer.

Definition at line 172 of file transfer.c.

References audioTrack, and cPlayer::DeviceClear().

void cTransfer::StripAudioPackets uchar   b,
int    Length,
uchar    Except = 0x00
[private]
 

Definition at line 119 of file transfer.c.

References canToggleAudioTrack, cPlayer::PlayAudio(), and uchar.

Referenced by Action().


Field Documentation

bool cTransfer::active [private]
 

Definition at line 27 of file transfer.h.

Referenced by Action(), Activate(), cTransfer(), and Receive().

uchar cTransfer::audioTrack [private]
 

Definition at line 25 of file transfer.h.

Referenced by cTransfer(), GetAudioTracks(), and SetAudioTrack().

bool cTransfer::canToggleAudioTrack [private]
 

Definition at line 24 of file transfer.h.

Referenced by cTransfer(), NumAudioTracks(), and StripAudioPackets().

bool cTransfer::gotBufferReserve [private]
 

Definition at line 26 of file transfer.h.

Referenced by cTransfer().

cRemux* cTransfer::remux [private]
 

Definition at line 23 of file transfer.h.

Referenced by Action(), cTransfer(), and ~cTransfer().

cRingBufferLinear* cTransfer::ringBuffer [private]
 

Definition at line 22 of file transfer.h.

Referenced by Action(), cTransfer(), Receive(), and ~cTransfer().


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