vdr
2.2.0
|
Public Member Functions | |
cDvbPlayer (const char *FileName, bool PauseLive) | |
virtual | ~cDvbPlayer () |
void | SetMarks (cMarks *Marks) |
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) |
![]() | |
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) |
![]() | |
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, bool Forward) |
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) |
![]() | |
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 | |
cNonBlockingFileReader * | nonBlockingFileReader |
cRingBufferFrame * | ringBuffer |
cPtsIndex | ptsIndex |
cMarks * | marks |
cFileName * | fileName |
cIndexFile * | index |
cUnbufferedFile * | replayFile |
double | framesPerSecond |
bool | isPesRecording |
bool | pauseLive |
bool | eof |
bool | firstPacket |
ePlayModes | playMode |
ePlayDirs | playDir |
int | trickSpeed |
int | readIndex |
bool | readIndependent |
cFrame * | readFrame |
cFrame * | playFrame |
cFrame * | dropFrame |
bool | resyncAfterPause |
Static Private Attributes | |
static int | Speeds [] = { 0, -2, -4, -8, 1, 2, 4, 12, 0 } |
Additional Inherited Members | |
![]() | |
static tThreadId | ThreadId (void) |
static tThreadId | IsMainThread (void) |
static void | SetMainThreadId (void) |
Definition at line 205 of file dvbplayer.c.
|
private |
Enumerator | |
---|---|
pdForward | |
pdBackward |
Definition at line 208 of file dvbplayer.c.
|
private |
Enumerator | |
---|---|
pmPlay | |
pmPause | |
pmSlow | |
pmFast | |
pmStill |
Definition at line 207 of file dvbplayer.c.
cDvbPlayer::cDvbPlayer | ( | const char * | FileName, |
bool | PauseLive | ||
) |
Definition at line 263 of file dvbplayer.c.
References dropFrame, eof, esyslog, fileName, firstPacket, cRecording::FramesPerSecond(), framesPerSecond, index, cRecording::IsPesRecording(), isPesRecording, isyslog, marks, nonBlockingFileReader, NORMAL_SPEED, cIndexFile::Ok(), cFileName::Open(), pauseLive, pdForward, playDir, PLAYERBUFSIZE, playFrame, playMode, pmPlay, readFrame, readIndependent, readIndex, replayFile, resyncAfterPause, ringBuffer, and trickSpeed.
|
virtual |
Definition at line 303 of file dvbplayer.c.
References cPlayer::Detach(), fileName, index, readFrame, ringBuffer, and Save().
|
protectedvirtual |
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 413 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(), cMarks::GetNextBegin(), cIndexFile::GetNextIFrame(), Goto(), cFrame::Index(), index, cListObject::Index(), IndexToHMSF(), isPesRecording, cIndexFile::IsStillRecording(), isyslog, cIndexFile::Last(), cMutex::Lock(), LOCK_THREAD, LOG_ERROR, marks, MAXFRAMESIZE, MAXSTUCKATEOF, NextFile(), nonBlockingFileReader, cSetup::PauseAtLastMark, pauseLive, pdBackward, pdForward, PesGetPts(), playDir, playFrame, 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, cSetup::SkipEdited, cCondWait::SleepMs(), TsGetPts(), cMutex::Unlock(), and cNonBlockingFileReader::WaitForDataMs().
|
protectedvirtual |
Reimplemented from cPlayer.
Definition at line 403 of file dvbplayer.c.
References cThread::Cancel(), replayFile, and cThread::Start().
|
inline |
Definition at line 243 of file dvbplayer.c.
References cThread::Running().
Referenced by cDvbPlayerControl::Active().
void cDvbPlayer::Backward | ( | void | ) |
Definition at line 774 of file dvbplayer.c.
References cPlayer::DeviceIsPlayingVideo(), cPlayer::DeviceMute(), Empty(), esyslog, 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().
|
private |
Definition at line 339 of file dvbplayer.c.
References cPtsIndex::Clear(), cNonBlockingFileReader::Clear(), cRingBufferFrame::Clear(), cPlayer::DeviceClear(), cPlayer::DeviceGetSTC(), dropFrame, cPtsIndex::FindIndex(), firstPacket, LOCK_THREAD, nonBlockingFileReader, playFrame, ptsIndex, readFrame, readIndex, and ringBuffer.
Referenced by Action(), Backward(), Forward(), Goto(), Pause(), Play(), and SkipSeconds().
void cDvbPlayer::Forward | ( | void | ) |
Definition at line 724 of file dvbplayer.c.
References cPlayer::DeviceHasIBPTrickSpeed(), cPlayer::DeviceIsPlayingVideo(), cPlayer::DeviceMute(), Empty(), esyslog, 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().
|
inlinevirtual |
Reimplemented from cPlayer.
Definition at line 251 of file dvbplayer.c.
|
virtual |
Reimplemented from cPlayer.
Definition at line 907 of file dvbplayer.c.
References cPlayer::DeviceGetSTC(), cPtsIndex::FindIndex(), cIndexFile::GetNextIFrame(), index, cIndexFile::Last(), and ptsIndex.
Referenced by cDvbPlayerControl::GetIndex(), Play(), SetAudioTrack(), and SkipFrames().
|
virtual |
Reimplemented from cPlayer.
Definition at line 923 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 |
||
) |
Definition at line 858 of file dvbplayer.c.
References cPlayer::DevicePlay(), cPlayer::DeviceStillPicture(), Empty(), cIndexFile::GetNextIFrame(), index, isPesRecording, LOCK_THREAD, MAXFRAMESIZE, NextFile(), PesGetPts(), Play(), playMode, pmPause, pmStill, ptsIndex, cPtsIndex::Put(), ReadFrame(), readIndex, replayFile, and TsGetPts().
Referenced by Action(), cDvbPlayerControl::Goto(), Play(), and SetAudioTrack().
|
private |
Definition at line 356 of file dvbplayer.c.
References eof, fileName, cFileName::NextFile(), replayFile, and cFileName::SetOffset().
void cDvbPlayer::Pause | ( | void | ) |
Definition at line 689 of file dvbplayer.c.
References cPlayer::DeviceFreeze(), cPlayer::DeviceHasIBPTrickSpeed(), Empty(), LOCK_THREAD, pdBackward, pdForward, Play(), playDir, playMode, pmFast, pmPause, pmSlow, and pmStill.
Referenced by Backward(), Forward(), cDvbPlayerControl::Pause(), and TrickSpeed().
void cDvbPlayer::Play | ( | void | ) |
Definition at line 704 of file dvbplayer.c.
References cPlayer::DeviceHasIBPTrickSpeed(), cPlayer::DevicePlay(), Empty(), GetIndex(), Goto(), LOCK_THREAD, pdBackward, pdForward, playDir, playMode, pmFast, pmPlay, pmSlow, pmStill, and resyncAfterPause.
Referenced by Backward(), Forward(), Goto(), Pause(), cDvbPlayerControl::Play(), SkipSeconds(), and TrickSpeed().
|
private |
Definition at line 366 of file dvbplayer.c.
References cIndexFile::Get(), cIndexFile::GetResume(), index, and NextFile().
Referenced by Action().
|
private |
Definition at line 380 of file dvbplayer.c.
References cPlayer::DeviceGetSTC(), cPtsIndex::FindIndex(), cList< T >::First(), framesPerSecond, cIndexFile::GetNextIFrame(), index, cMutex::Lock(), marks, cMark::Position(), ptsIndex, RESUMEBACKUP, Setup, cSetup::SkipEdited, cIndexFile::StoreResume(), and cMutex::Unlock().
Referenced by ~cDvbPlayer().
|
virtual |
Reimplemented from cPlayer.
Definition at line 892 of file dvbplayer.c.
References GetIndex(), Goto(), cPtsIndex::IsEmpty(), cThread::IsMainThread(), playMode, pmPause, pmPlay, ptsIndex, and resyncAfterPause.
void cDvbPlayer::SetMarks | ( | cMarks * | Marks | ) |
Definition at line 314 of file dvbplayer.c.
References marks.
Referenced by cDvbPlayerControl::SetMarks().
int cDvbPlayer::SkipFrames | ( | int | Frames | ) |
Definition at line 826 of file dvbplayer.c.
References GetIndex(), cIndexFile::GetNextIFrame(), and index.
Referenced by cDvbPlayerControl::SkipFrames().
void cDvbPlayer::SkipSeconds | ( | int | Seconds | ) |
Definition at line 841 of file dvbplayer.c.
References cPlayer::DeviceGetSTC(), Empty(), cPtsIndex::FindIndex(), framesPerSecond, cIndexFile::GetNextIFrame(), index, LOCK_THREAD, max(), Play(), ptsIndex, readIndex, and SecondsToFrames().
Referenced by cDvbPlayerControl::SkipSeconds().
|
private |
Definition at line 319 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().
|
private |
Definition at line 229 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), and Empty().
|
private |
Definition at line 220 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), and NextFile().
|
private |
Definition at line 214 of file dvbplayer.c.
Referenced by cDvbPlayer(), NextFile(), and ~cDvbPlayer().
|
private |
Definition at line 221 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), and Empty().
|
private |
Definition at line 217 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), Save(), and SkipSeconds().
|
private |
Definition at line 215 of file dvbplayer.c.
Referenced by Action(), Backward(), cDvbPlayer(), Forward(), GetIndex(), Goto(), Resume(), Save(), SkipFrames(), SkipSeconds(), and ~cDvbPlayer().
|
private |
Definition at line 218 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), and Goto().
|
private |
Definition at line 213 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), Save(), and SetMarks().
|
private |
Definition at line 210 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), and Empty().
|
private |
Definition at line 219 of file dvbplayer.c.
Referenced by Action(), and cDvbPlayer().
|
private |
Definition at line 223 of file dvbplayer.c.
Referenced by Action(), Backward(), cDvbPlayer(), Forward(), GetReplayMode(), Pause(), Play(), and TrickSpeed().
|
private |
Definition at line 228 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), and Empty().
|
private |
Definition at line 222 of file dvbplayer.c.
Referenced by Action(), Backward(), cDvbPlayer(), Forward(), GetReplayMode(), Goto(), Pause(), Play(), SetAudioTrack(), and TrickSpeed().
|
private |
Definition at line 212 of file dvbplayer.c.
Referenced by Action(), Empty(), GetIndex(), Goto(), Save(), SetAudioTrack(), and SkipSeconds().
|
private |
Definition at line 227 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), Empty(), and ~cDvbPlayer().
|
private |
Definition at line 226 of file dvbplayer.c.
Referenced by Action(), and cDvbPlayer().
|
private |
Definition at line 225 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), Empty(), Goto(), and SkipSeconds().
|
private |
Definition at line 216 of file dvbplayer.c.
Referenced by Action(), Activate(), cDvbPlayer(), Goto(), and NextFile().
|
private |
Definition at line 230 of file dvbplayer.c.
Referenced by cDvbPlayer(), Play(), and SetAudioTrack().
|
private |
Definition at line 211 of file dvbplayer.c.
Referenced by Action(), cDvbPlayer(), Empty(), and ~cDvbPlayer().
|
staticprivate |
Definition at line 209 of file dvbplayer.c.
Referenced by TrickSpeed().
|
private |
Definition at line 224 of file dvbplayer.c.
Referenced by Backward(), cDvbPlayer(), Forward(), GetReplayMode(), and TrickSpeed().