vdr  2.0.6
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
cDvbPlayer Class Reference
Collaboration diagram for cDvbPlayer:
[legend]

Public Member Functions

 cDvbPlayer (const char *FileName, bool PauseLive)
 
virtual ~cDvbPlayer ()
 
bool Active (void)
 
void Pause (void)
 
void Play (void)
 
void Forward (void)
 
void Backward (void)
 
int SkipFrames (int Frames)
 
void SkipSeconds (int Seconds)
 
void Goto (int Position, bool Still=false)
 
virtual double FramesPerSecond (void)
 
virtual void SetAudioTrack (eTrackType Type, const tTrackId *TrackId)
 
virtual bool GetIndex (int &Current, int &Total, bool SnapToIFrame=false)
 
virtual bool GetReplayMode (bool &Play, bool &Forward, int &Speed)
 
- Public Member Functions inherited from cPlayer
 cPlayer (ePlayMode PlayMode=pmAudioVideo)
 
virtual ~cPlayer ()
 
bool IsAttached (void)
 
virtual void SetSubtitleTrack (eTrackType Type, const tTrackId *TrackId)
 

Protected Member Functions

virtual void Activate (bool On)
 
virtual void Action (void)
 
- Protected Member Functions inherited from cPlayer
void DeviceClrAvailableTracks (bool DescriptionsOnly=false)
 
bool DeviceSetAvailableTrack (eTrackType Type, int Index, uint16_t Id, const char *Language=NULL, const char *Description=NULL)
 
bool DeviceSetCurrentAudioTrack (eTrackType Type)
 
bool DeviceSetCurrentSubtitleTrack (eTrackType Type)
 
bool DevicePoll (cPoller &Poller, int TimeoutMs=0)
 
bool DeviceFlush (int TimeoutMs=0)
 
bool DeviceHasIBPTrickSpeed (void)
 
bool DeviceIsPlayingVideo (void)
 
void DeviceTrickSpeed (int Speed)
 
void DeviceClear (void)
 
void DevicePlay (void)
 
void DeviceFreeze (void)
 
void DeviceMute (void)
 
void DeviceSetVideoDisplayFormat (eVideoDisplayFormat VideoDisplayFormat)
 
void DeviceStillPicture (const uchar *Data, int Length)
 
uint64_t DeviceGetSTC (void)
 
void Detach (void)
 
int PlayPes (const uchar *Data, int Length, bool VideoOnly=false)
 
int PlayTs (const uchar *Data, int Length, bool VideoOnly=false)
 

Private Types

enum  ePlayModes {
  pmPlay, pmPause, pmSlow, pmFast,
  pmStill
}
 
enum  ePlayDirs { pdForward, pdBackward }
 

Private Member Functions

void TrickSpeed (int Increment)
 
void Empty (void)
 
bool NextFile (uint16_t FileNumber=0, off_t FileOffset=-1)
 
int Resume (void)
 
bool Save (void)
 
- Private Member Functions inherited from cThread
 cThread (const char *Description=NULL, bool LowPriority=false)
 
virtual ~cThread ()
 
void SetDescription (const char *Description,...) __attribute__((format(printf
 
void bool Start (void)
 
bool Active (void)
 
void SetPriority (int Priority)
 
void SetIOPriority (int Priority)
 
void Lock (void)
 
void Unlock (void)
 
bool Running (void)
 
void Cancel (int WaitSeconds=0)
 

Private Attributes

cNonBlockingFileReadernonBlockingFileReader
 
cRingBufferFrameringBuffer
 
cPtsIndex ptsIndex
 
cFileNamefileName
 
cIndexFileindex
 
cUnbufferedFilereplayFile
 
double framesPerSecond
 
bool isPesRecording
 
bool pauseLive
 
bool eof
 
bool firstPacket
 
ePlayModes playMode
 
ePlayDirs playDir
 
int trickSpeed
 
int readIndex
 
bool readIndependent
 
cFramereadFrame
 
cFrameplayFrame
 
cFramedropFrame
 
bool resyncAfterPause
 

Static Private Attributes

static int Speeds [] = { 0, -2, -4, -8, 1, 2, 4, 12, 0 }
 

Additional Inherited Members

- Static Private Member Functions inherited from cThread
static tThreadId ThreadId (void)
 
static tThreadId IsMainThread (void)
 
static void SetMainThreadId (void)
 

Detailed Description

Definition at line 206 of file dvbplayer.c.

Member Enumeration Documentation

enum cDvbPlayer::ePlayDirs
private
Enumerator
pdForward 
pdBackward 

Definition at line 209 of file dvbplayer.c.

enum cDvbPlayer::ePlayModes
private
Enumerator
pmPlay 
pmPause 
pmSlow 
pmFast 
pmStill 

Definition at line 208 of file dvbplayer.c.

Constructor & Destructor Documentation

cDvbPlayer::cDvbPlayer ( const char *  FileName,
bool  PauseLive 
)
cDvbPlayer::~cDvbPlayer ( )
virtual

Definition at line 301 of file dvbplayer.c.

References cPlayer::Detach(), fileName, index, readFrame, ringBuffer, and Save().

Member Function Documentation

void cDvbPlayer::Action ( void  )
protectedvirtual
void cDvbPlayer::Activate ( bool  On)
protectedvirtual

Reimplemented from cPlayer.

Definition at line 389 of file dvbplayer.c.

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

bool cDvbPlayer::Active ( void  )
inline

Definition at line 242 of file dvbplayer.c.

References cThread::Running().

Referenced by cDvbPlayerControl::Active().

void cDvbPlayer::Backward ( void  )
void cDvbPlayer::Empty ( void  )
private
void cDvbPlayer::Forward ( void  )
virtual double cDvbPlayer::FramesPerSecond ( void  )
inlinevirtual

Reimplemented from cPlayer.

Definition at line 250 of file dvbplayer.c.

References framesPerSecond.

bool cDvbPlayer::GetIndex ( int &  Current,
int &  Total,
bool  SnapToIFrame = false 
)
virtual
bool cDvbPlayer::GetReplayMode ( bool &  Play,
bool &  Forward,
int &  Speed 
)
virtual

Reimplemented from cPlayer.

Definition at line 849 of file dvbplayer.c.

References cSetup::MultiSpeedMode, NORMAL_SPEED, pdForward, playDir, playMode, pmFast, pmPlay, pmSlow, Setup, and trickSpeed.

Referenced by cDvbPlayerControl::GetReplayMode().

void cDvbPlayer::Goto ( int  Position,
bool  Still = false 
)
bool cDvbPlayer::NextFile ( uint16_t  FileNumber = 0,
off_t  FileOffset = -1 
)
private

Definition at line 348 of file dvbplayer.c.

References eof, fileName, cFileName::NextFile(), replayFile, and cFileName::SetOffset().

Referenced by Action(), Goto(), and Resume().

void cDvbPlayer::Pause ( void  )
void cDvbPlayer::Play ( void  )
int cDvbPlayer::Resume ( void  )
private

Definition at line 358 of file dvbplayer.c.

References cIndexFile::Get(), cIndexFile::GetResume(), index, and NextFile().

Referenced by Action().

bool cDvbPlayer::Save ( void  )
private
void cDvbPlayer::SetAudioTrack ( eTrackType  Type,
const tTrackId TrackId 
)
virtual

Reimplemented from cPlayer.

Definition at line 818 of file dvbplayer.c.

References GetIndex(), Goto(), cPtsIndex::IsEmpty(), cThread::IsMainThread(), playMode, pmPause, pmPlay, ptsIndex, and resyncAfterPause.

int cDvbPlayer::SkipFrames ( int  Frames)

Definition at line 760 of file dvbplayer.c.

References GetIndex(), cIndexFile::GetNextIFrame(), and index.

Referenced by cDvbPlayerControl::SkipFrames().

void cDvbPlayer::SkipSeconds ( int  Seconds)
void cDvbPlayer::TrickSpeed ( int  Increment)
private

Member Data Documentation

cFrame* cDvbPlayer::dropFrame
private

Definition at line 229 of file dvbplayer.c.

Referenced by Action(), cDvbPlayer(), and Empty().

bool cDvbPlayer::eof
private

Definition at line 220 of file dvbplayer.c.

Referenced by Action(), cDvbPlayer(), and NextFile().

cFileName* cDvbPlayer::fileName
private

Definition at line 214 of file dvbplayer.c.

Referenced by cDvbPlayer(), NextFile(), and ~cDvbPlayer().

bool cDvbPlayer::firstPacket
private

Definition at line 221 of file dvbplayer.c.

Referenced by Action(), cDvbPlayer(), and Empty().

double cDvbPlayer::framesPerSecond
private

Definition at line 217 of file dvbplayer.c.

Referenced by Action(), cDvbPlayer(), FramesPerSecond(), Save(), and SkipSeconds().

cIndexFile* cDvbPlayer::index
private
bool cDvbPlayer::isPesRecording
private

Definition at line 218 of file dvbplayer.c.

Referenced by Action(), cDvbPlayer(), and Goto().

cNonBlockingFileReader* cDvbPlayer::nonBlockingFileReader
private

Definition at line 211 of file dvbplayer.c.

Referenced by Action(), cDvbPlayer(), and Empty().

bool cDvbPlayer::pauseLive
private

Definition at line 219 of file dvbplayer.c.

Referenced by Action(), and cDvbPlayer().

ePlayDirs cDvbPlayer::playDir
private

Definition at line 223 of file dvbplayer.c.

Referenced by Action(), Backward(), cDvbPlayer(), Forward(), GetReplayMode(), Pause(), Play(), and TrickSpeed().

cFrame* cDvbPlayer::playFrame
private

Definition at line 228 of file dvbplayer.c.

Referenced by Action(), cDvbPlayer(), and Empty().

ePlayModes cDvbPlayer::playMode
private
cPtsIndex cDvbPlayer::ptsIndex
private

Definition at line 213 of file dvbplayer.c.

Referenced by Action(), Empty(), GetIndex(), Goto(), Save(), SetAudioTrack(), and SkipSeconds().

cFrame* cDvbPlayer::readFrame
private

Definition at line 227 of file dvbplayer.c.

Referenced by Action(), cDvbPlayer(), Empty(), and ~cDvbPlayer().

bool cDvbPlayer::readIndependent
private

Definition at line 226 of file dvbplayer.c.

Referenced by Action(), and cDvbPlayer().

int cDvbPlayer::readIndex
private

Definition at line 225 of file dvbplayer.c.

Referenced by Action(), cDvbPlayer(), Empty(), Goto(), and SkipSeconds().

cUnbufferedFile* cDvbPlayer::replayFile
private

Definition at line 216 of file dvbplayer.c.

Referenced by Action(), Activate(), cDvbPlayer(), Goto(), and NextFile().

bool cDvbPlayer::resyncAfterPause
private

Definition at line 230 of file dvbplayer.c.

Referenced by cDvbPlayer(), Play(), and SetAudioTrack().

cRingBufferFrame* cDvbPlayer::ringBuffer
private

Definition at line 212 of file dvbplayer.c.

Referenced by Action(), cDvbPlayer(), Empty(), and ~cDvbPlayer().

int cDvbPlayer::Speeds = { 0, -2, -4, -8, 1, 2, 4, 12, 0 }
staticprivate

Definition at line 210 of file dvbplayer.c.

Referenced by TrickSpeed().

int cDvbPlayer::trickSpeed
private

Definition at line 224 of file dvbplayer.c.

Referenced by Backward(), cDvbPlayer(), Forward(), GetReplayMode(), and TrickSpeed().


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