vdr  1.7.27
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
cDvbPlayer Class Reference

List of all members.

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

Private Attributes

cNonBlockingFileReadernonBlockingFileReader
cRingBufferFrameringBuffer
cPtsIndex ptsIndex
cMarks marks
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

Static Private Attributes

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

Detailed Description

Definition at line 199 of file dvbplayer.c.


Member Enumeration Documentation

enum cDvbPlayer::ePlayDirs [private]
Enumerator:
pdForward 
pdBackward 

Definition at line 202 of file dvbplayer.c.

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

Definition at line 201 of file dvbplayer.c.


Constructor & Destructor Documentation

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

Definition at line 293 of file dvbplayer.c.

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


Member Function Documentation

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 395 of file dvbplayer.c.

References cFrame::Count(), cFrame::Data(), cPlayer::DeviceGetSTC(), cPlayer::DeviceHasIBPTrickSpeed(), cPlayer::DeviceIsPlayingVideo(), cPlayer::DevicePlay(), cPlayer::DevicePoll(), cRingBufferFrame::Drop(), dropFrame, Empty(), eof, esyslog, FATALERRNO, cPtsIndex::FindIndex(), cList< T >::First(), firstPacket, framesPerSecond, ftUnknown, cRingBufferFrame::Get(), cMarks::Get(), cIndexFile::Get(), cIndexFile::GetNextIFrame(), Goto(), cFrame::Index(), index, cListObject::Index(), IndexToHMSF(), isPesRecording, cIndexFile::IsStillRecording(), isyslog, cIndexFile::Last(), LOCK_THREAD, LOG_ERROR, marks, MAXFRAMESIZE, MAXSTUCKATEOF, cList< T >::Next(), NextFile(), nonBlockingFileReader, cSetup::PauseLastMark, pauseLive, pdBackward, pdForward, PesGetPts(), playDir, playFrame, cSetup::PlayJump, playMode, cPlayer::PlayPes(), cPlayer::PlayTs(), pmFast, pmPause, pmPlay, pmSlow, pmStill, cMark::Position(), cFrame::Pts(), ptsIndex, cPtsIndex::Put(), cRingBufferFrame::Put(), readFrame, readIndependent, readIndex, cNonBlockingFileReader::Reading(), replayFile, cNonBlockingFileReader::Request(), cNonBlockingFileReader::Result(), Resume(), ringBuffer, cThread::Running(), cRemux::SetBrokenLink(), Setup, cCondWait::SleepMs(), TsGetPts(), TsSetTeiOnBrokenPackets(), cMarks::Update(), and cNonBlockingFileReader::WaitForDataMs().

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

Reimplemented from cPlayer.

Definition at line 385 of file dvbplayer.c.

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

bool cDvbPlayer::Active ( void  ) [inline]

Checks whether the thread is still alive.

Reimplemented from cThread.

Definition at line 235 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  ) [inline, virtual]

Reimplemented from cPlayer.

Definition at line 243 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 888 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 340 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 350 of file dvbplayer.c.

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

Referenced by Action().

bool cDvbPlayer::Save ( void  ) [private]
int cDvbPlayer::SkipFrames ( int  Frames)

Definition at line 814 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

Definition at line 223 of file dvbplayer.c.

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

bool cDvbPlayer::eof [private]

Definition at line 214 of file dvbplayer.c.

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

Definition at line 208 of file dvbplayer.c.

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

bool cDvbPlayer::firstPacket [private]

Definition at line 215 of file dvbplayer.c.

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

double cDvbPlayer::framesPerSecond [private]

Definition at line 211 of file dvbplayer.c.

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

Definition at line 212 of file dvbplayer.c.

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

Definition at line 207 of file dvbplayer.c.

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

Definition at line 204 of file dvbplayer.c.

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

bool cDvbPlayer::pauseLive [private]

Definition at line 213 of file dvbplayer.c.

Referenced by Action(), and cDvbPlayer().

Definition at line 217 of file dvbplayer.c.

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

Definition at line 222 of file dvbplayer.c.

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

Reimplemented from cPlayer.

Definition at line 216 of file dvbplayer.c.

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

Definition at line 206 of file dvbplayer.c.

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

Definition at line 221 of file dvbplayer.c.

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

Definition at line 220 of file dvbplayer.c.

Referenced by Action(), and cDvbPlayer().

int cDvbPlayer::readIndex [private]

Definition at line 219 of file dvbplayer.c.

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

Definition at line 210 of file dvbplayer.c.

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

Definition at line 205 of file dvbplayer.c.

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

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

Definition at line 203 of file dvbplayer.c.

Referenced by TrickSpeed().

int cDvbPlayer::trickSpeed [private]

Definition at line 218 of file dvbplayer.c.

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


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