cDvbPlayer Class Reference

Inheritance diagram for cDvbPlayer:

Inheritance graph
[legend]
Collaboration diagram for cDvbPlayer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cDvbPlayer (const char *FileName)
virtual ~cDvbPlayer ()
bool Active (void)
 Checks whether the thread is still alive.
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 bool GetIndex (int &Current, int &Total, bool SnapToIFrame=false)
virtual bool GetReplayMode (bool &Play, bool &Forward, int &Speed)

Protected Member Functions

virtual void Activate (bool On)
virtual void Action (void)

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 (uchar FileNumber=0, int FileOffset=-1)
int Resume (void)
bool Save (void)

Private Attributes

cNonBlockingFileReadernonBlockingFileReader
cRingBufferFrameringBuffer
cBackTracebackTrace
cFileNamefileName
cIndexFileindex
cUnbufferedFilereplayFile
bool eof
bool firstPacket
ePlayModes playMode
ePlayDirs playDir
int trickSpeed
int readIndex
int writeIndex
cFramereadFrame
cFrameplayFrame

Static Private Attributes

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


Detailed Description

Definition at line 188 of file dvbplayer.c.


Member Enumeration Documentation

enum cDvbPlayer::ePlayModes [private]

Enumerator:
pmPlay 
pmPause 
pmSlow 
pmFast 
pmStill 

Definition at line 190 of file dvbplayer.c.

enum cDvbPlayer::ePlayDirs [private]

Enumerator:
pdForward 
pdBackward 

Definition at line 191 of file dvbplayer.c.


Constructor & Destructor Documentation

cDvbPlayer::cDvbPlayer ( const char *  FileName  ) 

Definition at line 236 of file dvbplayer.c.

References backTrace, eof, esyslog, fileName, firstPacket, index, isyslog, nonBlockingFileReader, NORMAL_SPEED, cIndexFile::Ok(), cFileName::Open(), pdForward, playDir, PLAYERBUFSIZE, playFrame, playMode, pmPlay, readFrame, readIndex, replayFile, ringBuffer, trickSpeed, and writeIndex.

Here is the call graph for this function:

cDvbPlayer::~cDvbPlayer (  )  [virtual]

Definition at line 268 of file dvbplayer.c.

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

Here is the call graph for this function:


Member Function Documentation

void cDvbPlayer::TrickSpeed ( int  Increment  )  [private]

Definition at line 279 of file dvbplayer.c.

References cPlayer::DeviceTrickSpeed(), MAX_VIDEO_SLOWMOTION, Pause(), pdForward, Play(), playDir, playMode, pmFast, pmSlow, SPEED_MULT, Speeds, and trickSpeed.

Referenced by Backward(), and Forward().

Here is the call graph for this function:

void cDvbPlayer::Empty ( void   )  [private]

Definition at line 299 of file dvbplayer.c.

References backTrace, cBackTrace::Clear(), cRingBufferFrame::Clear(), cNonBlockingFileReader::Clear(), cPlayer::DeviceClear(), firstPacket, cBackTrace::Get(), LOCK_THREAD, nonBlockingFileReader, pdForward, playDir, playFrame, readFrame, readIndex, ringBuffer, and writeIndex.

Referenced by Backward(), Forward(), Goto(), Pause(), Play(), and SkipSeconds().

Here is the call graph for this function:

bool cDvbPlayer::NextFile ( uchar  FileNumber = 0,
int  FileOffset = -1 
) [private]

Definition at line 315 of file dvbplayer.c.

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

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

Here is the call graph for this function:

int cDvbPlayer::Resume ( void   )  [private]

Definition at line 325 of file dvbplayer.c.

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

Referenced by Action().

Here is the call graph for this function:

bool cDvbPlayer::Save ( void   )  [private]

Definition at line 339 of file dvbplayer.c.

References cIndexFile::GetNextIFrame(), index, RESUMEBACKUP, cIndexFile::StoreResume(), and writeIndex.

Referenced by ~cDvbPlayer().

Here is the call graph for this function:

void cDvbPlayer::Activate ( bool  On  )  [protected, virtual]

Reimplemented from cPlayer.

Definition at line 356 of file dvbplayer.c.

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

Here is the call graph for this function:

void cDvbPlayer::Action ( void   )  [protected, 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 366 of file dvbplayer.c.

References cBackTrace::Add(), cRingBufferFrame::Available(), backTrace, cFrame::Count(), cFrame::Data(), cPlayer::DeviceFlush(), cPlayer::DevicePlay(), cPlayer::DevicePoll(), cRingBufferFrame::Drop(), eof, esyslog, FATALERRNO, firstPacket, ftUnknown, cRingBufferFrame::Get(), cIndexFile::Get(), cIndexFile::GetNextIFrame(), cFrame::Index(), index, IndexToHMSF(), cIndexFile::IsStillRecording(), isyslog, LOCK_THREAD, LOG_ERROR, MALLOC, MAXFRAMESIZE, NextFile(), nonBlockingFileReader, pdBackward, pdForward, playDir, playFrame, playMode, cPlayer::PlayPes(), pmFast, pmPause, pmPlay, pmSlow, pmStill, cRingBufferFrame::Put(), cNonBlockingFileReader::Read(), readFrame, readIndex, cNonBlockingFileReader::Reading(), replayFile, Resume(), ringBuffer, cThread::Running(), cRemux::SetBrokenLink(), cCondWait::SleepMs(), cNonBlockingFileReader::WaitForDataMs(), and writeIndex.

Here is the call graph for this function:

bool cDvbPlayer::Active ( void   )  [inline]

Checks whether the thread is still alive.

Reimplemented from cThread.

Definition at line 218 of file dvbplayer.c.

References cThread::Running().

Referenced by cDvbPlayerControl::Active().

Here is the call graph for this function:

void cDvbPlayer::Pause ( void   ) 

Definition at line 528 of file dvbplayer.c.

References cPlayer::DeviceFreeze(), Empty(), LOCK_THREAD, pdBackward, Play(), playDir, playMode, pmFast, pmPause, pmSlow, and pmStill.

Referenced by Backward(), Forward(), cDvbPlayerControl::Pause(), and TrickSpeed().

Here is the call graph for this function:

void cDvbPlayer::Play ( void   ) 

Definition at line 541 of file dvbplayer.c.

References cPlayer::DevicePlay(), Empty(), LOCK_THREAD, pdBackward, pdForward, playDir, playMode, pmFast, pmPlay, pmSlow, and pmStill.

Referenced by Backward(), Forward(), Pause(), cDvbPlayerControl::Play(), SkipSeconds(), and TrickSpeed().

Here is the call graph for this function:

void cDvbPlayer::Forward ( void   ) 

Definition at line 553 of file dvbplayer.c.

References cPlayer::DeviceMute(), Empty(), index, LOCK_THREAD, MAX_SPEEDS, cSetup::MultiSpeedMode, NORMAL_SPEED, Pause(), pdForward, Play(), playDir, playMode, pmFast, pmPause, pmPlay, pmSlow, pmStill, Setup, trickSpeed, and TrickSpeed().

Referenced by cDvbPlayerControl::Forward().

Here is the call graph for this function:

void cDvbPlayer::Backward ( void   ) 

Definition at line 599 of file dvbplayer.c.

References cPlayer::DeviceMute(), Empty(), index, LOCK_THREAD, MAX_SPEEDS, cSetup::MultiSpeedMode, NORMAL_SPEED, Pause(), pdBackward, Play(), playDir, playMode, pmFast, pmPause, pmPlay, pmSlow, pmStill, Setup, trickSpeed, and TrickSpeed().

Referenced by cDvbPlayerControl::Backward().

Here is the call graph for this function:

int cDvbPlayer::SkipFrames ( int  Frames  ) 

Definition at line 648 of file dvbplayer.c.

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

Referenced by cDvbPlayerControl::SkipFrames().

Here is the call graph for this function:

void cDvbPlayer::SkipSeconds ( int  Seconds  ) 

Definition at line 663 of file dvbplayer.c.

References Empty(), FRAMESPERSEC, cIndexFile::GetNextIFrame(), index, LOCK_THREAD, max(), Play(), readIndex, and writeIndex.

Referenced by cDvbPlayerControl::SkipSeconds().

Here is the call graph for this function:

void cDvbPlayer::Goto ( int  Position,
bool  Still = false 
)

Definition at line 680 of file dvbplayer.c.

References cPlayer::DevicePlay(), cPlayer::DeviceStillPicture(), Empty(), cIndexFile::GetNextIFrame(), index, LOCK_THREAD, MAXFRAMESIZE, NextFile(), playMode, pmPause, pmStill, ReadFrame(), readIndex, replayFile, and writeIndex.

Referenced by cDvbPlayerControl::Goto().

Here is the call graph for this function:

bool cDvbPlayer::GetIndex ( int &  Current,
int &  Total,
bool  SnapToIFrame = false 
) [virtual]

Reimplemented from cPlayer.

Definition at line 727 of file dvbplayer.c.

References cIndexFile::GetNextIFrame(), index, cIndexFile::Last(), max(), playMode, pmStill, readIndex, and writeIndex.

Referenced by cDvbPlayerControl::GetIndex(), and SkipFrames().

Here is the call graph for this function:

bool cDvbPlayer::GetReplayMode ( bool &  Play,
bool &  Forward,
int &  Speed 
) [virtual]

Reimplemented from cPlayer.

Definition at line 747 of file dvbplayer.c.

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

Referenced by cDvbPlayerControl::GetReplayMode().


Member Data Documentation

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

Definition at line 192 of file dvbplayer.c.

Referenced by TrickSpeed().

cNonBlockingFileReader* cDvbPlayer::nonBlockingFileReader [private]

Definition at line 193 of file dvbplayer.c.

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

cRingBufferFrame* cDvbPlayer::ringBuffer [private]

Definition at line 194 of file dvbplayer.c.

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

cBackTrace* cDvbPlayer::backTrace [private]

Definition at line 195 of file dvbplayer.c.

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

cFileName* cDvbPlayer::fileName [private]

Definition at line 196 of file dvbplayer.c.

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

cIndexFile* cDvbPlayer::index [private]

Definition at line 197 of file dvbplayer.c.

Referenced by Action(), Backward(), cDvbPlayer(), Forward(), GetIndex(), Goto(), Resume(), Save(), SkipFrames(), SkipSeconds(), and ~cDvbPlayer().

cUnbufferedFile* cDvbPlayer::replayFile [private]

Definition at line 198 of file dvbplayer.c.

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

bool cDvbPlayer::eof [private]

Definition at line 199 of file dvbplayer.c.

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

bool cDvbPlayer::firstPacket [private]

Definition at line 200 of file dvbplayer.c.

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

ePlayModes cDvbPlayer::playMode [private]

Reimplemented from cPlayer.

Definition at line 201 of file dvbplayer.c.

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

ePlayDirs cDvbPlayer::playDir [private]

Definition at line 202 of file dvbplayer.c.

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

int cDvbPlayer::trickSpeed [private]

Definition at line 203 of file dvbplayer.c.

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

int cDvbPlayer::readIndex [private]

Definition at line 204 of file dvbplayer.c.

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

int cDvbPlayer::writeIndex [private]

Definition at line 204 of file dvbplayer.c.

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

cFrame* cDvbPlayer::readFrame [private]

Definition at line 205 of file dvbplayer.c.

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

cFrame* cDvbPlayer::playFrame [private]

Definition at line 206 of file dvbplayer.c.

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


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