MythTV  master
Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
MythPlayer Class Reference

#include <mythplayer.h>

Inheritance diagram for MythPlayer:
Inheritance graph
[legend]
Collaboration diagram for MythPlayer:
Collaboration graph
[legend]

Signals

void CheckCallbacks ()
 
void SeekingSlow (int Count)
 
void SeekingComplete ()
 
void SeekingDone ()
 
void PauseChanged (bool Paused)
 
void RequestResetCaptions ()
 
void SignalTracksChanged (uint Type)
 

Public Member Functions

 MythPlayer (PlayerContext *Context, PlayerFlags Flags=kNoFlags)
 
 ~MythPlayer () override
 
virtual int OpenFile (int Retries=4)
 
virtual bool InitVideo (void)
 
virtual void ReinitVideo (bool ForceUpdate)
 
virtual void InitFrameInterval ()
 
void SetLength (std::chrono::seconds len)
 
void SetFramesPlayed (uint64_t played)
 
void SetEof (EofState eof)
 
void SetWatchingRecording (bool mode)
 
void SetKeyframeDistance (int keyframedistance)
 
virtual void SetVideoParams (int w, int h, double fps, float aspect, bool ForceUpdate, int ReferenceFrames, FrameScanType=kScan_Ignore, const QString &codecName=QString())
 
void SetFileLength (std::chrono::seconds total, int frames)
 
void SetDuration (std::chrono::seconds duration)
 
void SetFrameRate (double fps)
 
QSize GetVideoBufferSize (void) const
 
QSize GetVideoSize (void) const
 
float GetVideoAspect (void) const
 
float GetFrameRate (void) const
 
bool IsAudioNeeded (void)
 
int GetFreeVideoFrames (void) const
 Returns the number of frames available for decoding onto. More...
 
int GetFFRewSkip (void) const
 
float GetPlaySpeed (void) const
 
AudioPlayerGetAudio (void)
 
float GetNextPlaySpeed (void) const
 
std::chrono::seconds GetLength (void) const
 
uint64_t GetTotalFrameCount (void) const
 
uint64_t GetCurrentFrameCount (void) const
 
uint64_t GetFramesPlayed (void) const
 
virtual uint64_t GetBookmark (void)
 
QString GetError (void) const
 
QString GetEncodingType (void) const
 
QString GetXDS (const QString &key) const
 
bool IsPaused (void) const
 
bool GetRawAudioState (void) const
 
bool GetLimitKeyRepeat (void) const
 
EofState GetEof (void) const
 
bool IsErrored (void) const
 
bool IsPlaying (std::chrono::milliseconds wait_in_msec=0ms, bool wait_for=true) const
 
bool AtNormalSpeed (void) const
 
bool IsReallyNearEnd (void) const
 Returns true iff really near end of recording. More...
 
bool IsNearEnd (void)
 Returns true iff near end of recording. More...
 
bool HasTVChainNext (void) const
 
bool IsWatchingInprogress (void) const
 
virtual InteractiveTVGetInteractiveTV ()
 
MythVideoOutputGetVideoOutput (void)
 
virtual bool SwitchTitle (int)
 
virtual bool NextTitle (void)
 
virtual bool PrevTitle (void)
 
virtual bool SwitchAngle (int)
 
virtual bool NextAngle (void)
 
virtual bool PrevAngle (void)
 
MythVideoFrameGetNextVideoFrame (void)
 Removes a frame from the available queue for decoding onto. More...
 
void DeLimboFrame (MythVideoFrame *frame)
 
virtual void ReleaseNextVideoFrame (MythVideoFrame *buffer, std::chrono::milliseconds timecode, bool wrap=true)
 Places frame on the queue of frames ready for display. More...
 
void DiscardVideoFrame (MythVideoFrame *buffer)
 Places frame in the available frames queue. More...
 
void DiscardVideoFrames (bool KeyFrame, bool Flushed)
 Places frames in the available frames queue. More...
 
DecoderBaseGetDecoder (void)
 Returns the stream decoder currently in use. More...
 
virtual bool HasReachedEof (void) const
 
void SetDisablePassThrough (bool disabled)
 
void ForceSetupAudioStream (void)
 
virtual bool PrepareAudioSample (std::chrono::milliseconds &timecode)
 
virtual CC708ReaderGetCC708Reader (uint=0)
 
virtual CC608ReaderGetCC608Reader (uint=0)
 
virtual SubtitleReaderGetSubReader (uint=0)
 
virtual TeletextReaderGetTeletextReader (uint=0)
 
void EnableForcedSubtitles (bool enable)
 
bool GetAllowForcedSubtitles (void) const
 
void CheckTVChain ()
 
void FileChangedCallback ()
 
virtual int GetNumChapters (void)
 
virtual int GetCurrentChapter (void)
 
virtual void GetChapterTimes (QList< std::chrono::seconds > &times)
 
virtual int GetNumTitles (void) const
 
virtual int GetCurrentTitle (void) const
 
virtual std::chrono::seconds GetTitleDuration (int) const
 
virtual QString GetTitleName (int) const
 
virtual int GetNumAngles (void) const
 
virtual int GetCurrentAngle (void) const
 
virtual QString GetAngleName (int) const
 
virtual bool IsInStillFrame () const
 
bool PosMapFromEnc (uint64_t start, frm_pos_map_t &posMap, frm_pos_map_t &durMap)
 
void SaveTotalDuration (void)
 
void ResetTotalDuration (void)
 
void SaveTotalFrames (void)
 
void SetErrored (const QString &reason)
 

Static Public Attributes

static const int kNightModeBrightenssAdjustment = 10
 
static const int kNightModeContrastAdjustment = 10
 
static const double kInaccuracyNone = 0
 
static const double kInaccuracyDefault = 0.1
 
static const double kInaccuracyEditor = 0.5
 
static const double kInaccuracyFull = -1.0
 
static const double kSeekToEndOffset = 1.0
 

Protected Member Functions

void OpenDummy (void)
 
virtual long long CalcMaxFFTime (long long ff, bool setjump=true) const
 CalcMaxFFTime(ffframes): forward ffframes forward. More...
 
long long CalcRWTime (long long rw) const
 CalcRWTime(rw): rewind rw frames back. More...
 
std::chrono::milliseconds TranslatePositionFrameToMs (uint64_t position, bool use_cutlist) const
 
uint64_t TranslatePositionMsToFrame (std::chrono::milliseconds position, bool use_cutlist) const
 
uint64_t TranslatePositionAbsToRel (uint64_t position) const
 
uint64_t TranslatePositionRelToAbs (uint64_t position) const
 
float ComputeSecs (uint64_t position, bool use_cutlist) const
 
uint64_t FindFrame (float offset, bool use_cutlist) const
 
void SetAutoCommercialSkip (CommSkipMode autoskip)
 
void SkipCommercials (int direction)
 
void SetCommBreakMap (const frm_dir_map_t &NewMap)
 
CommSkipMode GetAutoCommercialSkip (void)
 
virtual void ResetPlaying (bool resetframes=true)
 
virtual void StopPlaying (void)
 
bool PauseDecoder (void)
 
void UnpauseDecoder (void)
 
bool Pause (void)
 
bool Play (float speed=1.0, bool normal=true, bool unpauseaudio=true)
 
virtual bool FastForward (float seconds)
 
virtual bool Rewind (float seconds)
 
virtual bool JumpToFrame (uint64_t frame)
 
void JumpChapter (int chapter)
 
virtual bool PrebufferEnoughFrames (int min_buffers=0)
 
void SetBuffering (bool new_buffering)
 
virtual void VideoEnd (void)
 
virtual void DecoderStart (bool start_paused)
 
virtual void DecoderLoop (bool pause)
 
virtual void DecoderEnd (void)
 
virtual void DecoderPauseCheck (void)
 
virtual void AudioEnd (void)
 
bool GetEditMode (void) const
 
bool IsInDelete (uint64_t frame)
 
bool FlagIsSet (PlayerFlags arg)
 
void SetPlayingInfo (const ProgramInfo &pginfo)
 
void SetPlaying (bool is_playing)
 
void ResetErrored (void)
 
void PauseVideo (void)
 
void UnpauseVideo (void)
 
void PauseBuffer (void)
 
void UnpauseBuffer (void)
 
virtual void CreateDecoder (TestBufferVec &TestBuffer)
 
void SetDecoder (DecoderBase *dec)
 Sets the stream decoder, deleting any existing recorder. More...
 
const DecoderBaseGetDecoder (void) const
 Returns the stream decoder currently in use. More...
 
virtual void DoFFRewSkip (void)
 
bool DecoderGetFrame (DecodeType decodetype, bool unsafe=false)
 
bool DoGetFrame (DecodeType DecodeType)
 Get one frame from the decoder. More...
 
bool UpdateFFRewSkip (float ffrewScale=1.0F)
 
virtual void ChangeSpeed (void)
 
bool DoFastForward (uint64_t frames, double inaccuracy)
 
bool DoRewind (uint64_t frames, double inaccuracy)
 
void DoJumpToFrame (uint64_t frame, double inaccuracy)
 
void WaitForSeek (uint64_t frame, uint64_t seeksnap_wanted)
 
void ClearAfterSeek (bool clearvideobuffers=true)
 This is to support seeking... More...
 
virtual bool DoJumpChapter (int chapter)
 
virtual int64_t GetChapter (int chapter)
 
void WrapTimecode (std::chrono::milliseconds &timecode, TCTypes tc_type)
 
void SetFrameInterval (FrameScanType scan, double frame_period)
 

Protected Attributes

DecoderBasem_decoder {nullptr}
 
QRecursiveMutex m_decoderChangeLock
 
MythVideoOutputm_videoOutput {nullptr}
 
const VideoFrameTypesm_renderFormats { &MythVideoFrame::kDefaultRenderFormats }
 
PlayerContextm_playerCtx {nullptr}
 
MythDecoderThreadm_decoderThread {nullptr}
 
QThread * m_playerThread {nullptr}
 
PlayerFlags m_playerFlags
 
QWaitCondition m_decoderThreadPause
 
QWaitCondition m_decoderThreadUnpause
 
QMutex m_decoderPauseLock
 
QMutex m_decoderSeekLock
 
QMutex m_bufferPauseLock
 
QMutex m_videoPauseLock
 
QMutex m_pauseLock
 
int64_t m_decoderSeek {-1}
 
bool m_totalDecoderPause {false}
 
bool m_decoderPaused {false}
 
bool m_inJumpToProgramPause {false}
 
bool m_pauseDecoder {false}
 
bool m_unpauseDecoder {false}
 
bool volatile m_killDecoder {false}
 
bool m_decodeOneFrame {false}
 
bool m_renderOneFrame {false}
 
bool m_needNewPauseFrame {false}
 
bool m_bufferPaused {false}
 
bool m_videoPaused {false}
 
bool m_allPaused {false}
 
bool m_playing {false}
 
QWaitCondition m_playingWaitCond
 
QMutex m_vidExitLock
 
QMutex m_playingLock
 
QMutex m_errorLock
 
QString m_errorMsg
 Reason why NVP exited with a error. More...
 
int m_errorType {kError_None}
 
bool m_liveTV {false}
 
bool m_watchingRecording {false}
 
bool m_transcoding {false}
 
bool m_hasFullPositionMap {false}
 
bool m_limitKeyRepeat {false}
 
int m_jumpChapter {0}
 
uint64_t m_bookmarkSeek {0}
 
int m_endExitPrompt
 
long long m_ffTime {0}
 If m_ffTime>0, number of frames to seek forward. More...
 
int m_videobufRetries {0}
 How often we have tried to wait for a video output buffer and failed. More...
 
uint64_t m_framesPlayed {0}
 
uint64_t m_totalFrames {0}
 
std::chrono::seconds m_totalLength {0s}
 
std::chrono::seconds m_totalDuration {0s}
 
long long m_rewindTime {0}
 
std::chrono::milliseconds m_latestVideoTimecode {-1ms}
 
MythPlayerAVSync m_avSync
 
double m_videoFrameRate {29.97}
 Video (input) Frame Rate (often inaccurate) More...
 
QString m_codecName
 Codec Name - used by playback profile. More...
 
QSize m_videoDispDim {0,0}
 Video (input) width & height. More...
 
QSize m_videoDim {0,0}
 Video (input) buffer width & height. More...
 
int m_maxReferenceFrames {0}
 Number of reference frames used in the video stream. More...
 
float m_videoAspect {4.0F / 3.0F}
 Video (input) Apect Ratio. More...
 
float m_forcedVideoAspect {-1}
 
uint m_keyframeDist {30}
 Video (input) Number of frames between key frames (often inaccurate) More...
 
bool m_buffering {false}
 
QTime m_bufferingStart
 
QTime m_bufferingLastMsg
 
uint m_vbiMode {VBIMode::None}
 VBI decoder to use. More...
 
int m_ttPageNum {0x888}
 VBI page to display when in PAL vbimode. More...
 
SubtitleReader m_subReader
 
TeletextReader m_ttxReader
 
bool m_captionsEnabledbyDefault {false}
 This allows us to enable captions/subtitles later if the streams are not immediately available when the video starts playing. More...
 
bool m_enableForcedSubtitles {false}
 
bool m_disableForcedSubtitles {false}
 
bool m_allowForcedSubtitles {true}
 
CC608Reader m_cc608
 
CC708Reader m_cc708
 
AudioPlayer m_audio
 
CommBreakMap m_commBreakMap
 
bool m_forcePositionMapSync {false}
 
DeleteMap m_deleteMap
 
QRecursiveMutex m_decoderLock
 Lock for next_play_speed and next_normal_speed. More...
 
float m_nextPlaySpeed {1.0F}
 
float m_playSpeed {1.0F}
 
std::chrono::microseconds m_frameInterval {microsecondsFromFloat(1000000.0F / 30)}
 always adjusted for play_speed More...
 
int m_fpsMultiplier {1}
 used to detect changes More...
 
int m_ffrewSkip {1}
 
int m_ffrewAdjust {0}
 offset after last skip More...
 
float m_ffrewScale {1.0F}
 scale skip for large gops More...
 
bool m_fileChanged {false}
 
bool m_nextNormalSpeed {true}
 
bool m_normalSpeed {true}
 
tctype_arr m_tcWrap {}
 
std::chrono::milliseconds m_savedAudioTimecodeOffset {0ms}
 
bool m_isDummy {false}
 
int m_bufferingCounter {0}
 

Private Member Functions

void syncWithAudioStretch ()
 

Private Attributes

bool m_disablePassthrough {false}
 

Friends

class PlayerContext
 
class CC708Reader
 
class CC608Reader
 
class MythDecoderThread
 
class VideoPerformanceTest
 
class TV
 
class Transcode
 

Detailed Description

Definition at line 83 of file mythplayer.h.

Constructor & Destructor Documentation

◆ MythPlayer()

MythPlayer::MythPlayer ( PlayerContext Context,
PlayerFlags  Flags = kNoFlags 
)
explicit

Definition at line 81 of file mythplayer.cpp.

◆ ~MythPlayer()

MythPlayer::~MythPlayer ( )
override

Definition at line 110 of file mythplayer.cpp.

Member Function Documentation

◆ CheckCallbacks

void MythPlayer::CheckCallbacks ( )
signal

◆ SeekingSlow

void MythPlayer::SeekingSlow ( int  Count)
signal

◆ SeekingComplete

void MythPlayer::SeekingComplete ( )
signal

◆ SeekingDone

void MythPlayer::SeekingDone ( )
signal

◆ PauseChanged

void MythPlayer::PauseChanged ( bool  Paused)
signal

◆ RequestResetCaptions

void MythPlayer::RequestResetCaptions ( )
signal

◆ SignalTracksChanged

void MythPlayer::SignalTracksChanged ( uint  Type)
signal

◆ OpenFile()

int MythPlayer::OpenFile ( int  Retries = 4)
virtual

◆ InitVideo()

bool MythPlayer::InitVideo ( void  )
virtual

◆ ReinitVideo()

void MythPlayer::ReinitVideo ( bool  ForceUpdate)
virtual

Reimplemented in MythPlayerUI.

Definition at line 297 of file mythplayer.cpp.

Referenced by MythPlayerUI::ReinitVideo(), and SetVideoParams().

◆ InitFrameInterval()

void MythPlayer::InitFrameInterval ( )
virtual

Reimplemented in MythPlayerUI.

Definition at line 697 of file mythplayer.cpp.

Referenced by MythPlayerUI::InitFrameInterval().

◆ SetLength()

void MythPlayer::SetLength ( std::chrono::seconds  len)
inline

Definition at line 117 of file mythplayer.h.

Referenced by TV::CreatePlayer(), and TV::customEvent().

◆ SetFramesPlayed()

void MythPlayer::SetFramesPlayed ( uint64_t  played)

◆ SetEof()

void MythPlayer::SetEof ( EofState  eof)

◆ SetWatchingRecording()

void MythPlayer::SetWatchingRecording ( bool  mode)

Definition at line 123 of file mythplayer.cpp.

Referenced by CheckTVChain(), TV::CreatePlayer(), and TV::customEvent().

◆ SetKeyframeDistance()

void MythPlayer::SetKeyframeDistance ( int  keyframedistance)

◆ SetVideoParams()

void MythPlayer::SetVideoParams ( int  w,
int  h,
double  fps,
float  aspect,
bool  ForceUpdate,
int  ReferenceFrames,
FrameScanType  = kScan_Ignore,
const QString &  codecName = QString() 
)
virtual

◆ SetFileLength()

void MythPlayer::SetFileLength ( std::chrono::seconds  total,
int  frames 
)

◆ SetDuration()

void MythPlayer::SetDuration ( std::chrono::seconds  duration)

Definition at line 393 of file mythplayer.cpp.

Referenced by AvFormatDecoder::OpenFile().

◆ SetFrameRate()

void MythPlayer::SetFrameRate ( double  fps)

Definition at line 377 of file mythplayer.cpp.

Referenced by AvFormatDecoder::ProcessVideoFrame().

◆ GetVideoBufferSize()

QSize MythPlayer::GetVideoBufferSize ( void  ) const
inline

◆ GetVideoSize()

QSize MythPlayer::GetVideoSize ( void  ) const
inline

◆ GetVideoAspect()

float MythPlayer::GetVideoAspect ( void  ) const
inline

◆ GetFrameRate()

float MythPlayer::GetFrameRate ( void  ) const
inline

◆ IsAudioNeeded()

bool MythPlayer::IsAudioNeeded ( void  )
inline

Definition at line 135 of file mythplayer.h.

Referenced by AudioPlayer::ReinitAudio().

◆ GetFreeVideoFrames()

int MythPlayer::GetFreeVideoFrames ( void  ) const

Returns the number of frames available for decoding onto.

Definition at line 572 of file mythplayer.cpp.

Referenced by AvFormatDecoder::GenerateDummyVideoFrames().

◆ GetFFRewSkip()

int MythPlayer::GetFFRewSkip ( void  ) const
inline

◆ GetPlaySpeed()

float MythPlayer::GetPlaySpeed ( void  ) const
inline

Definition at line 139 of file mythplayer.h.

Referenced by TV::GetStatus(), and MythVideoScanTracker::SetScanType().

◆ GetAudio()

AudioPlayer* MythPlayer::GetAudio ( void  )
inline

Definition at line 140 of file mythplayer.h.

◆ GetNextPlaySpeed()

float MythPlayer::GetNextPlaySpeed ( void  ) const
inline

◆ GetLength()

std::chrono::seconds MythPlayer::GetLength ( void  ) const
inline

Definition at line 142 of file mythplayer.h.

◆ GetTotalFrameCount()

uint64_t MythPlayer::GetTotalFrameCount ( void  ) const
inline

◆ GetCurrentFrameCount()

uint64_t MythPlayer::GetCurrentFrameCount ( void  ) const

◆ GetFramesPlayed()

uint64_t MythPlayer::GetFramesPlayed ( void  ) const
inline

◆ GetBookmark()

uint64_t MythPlayer::GetBookmark ( void  )
virtual

◆ GetError()

QString MythPlayer::GetError ( void  ) const

Definition at line 1958 of file mythplayer.cpp.

Referenced by TV::HandleStateChange(), and TV::StartTV().

◆ GetEncodingType()

QString MythPlayer::GetEncodingType ( void  ) const

Definition at line 1712 of file mythplayer.cpp.

Referenced by MythPlayerUI::GetCodecDescription().

◆ GetXDS()

QString MythPlayer::GetXDS ( const QString &  key) const

Definition at line 1726 of file mythplayer.cpp.

Referenced by TV::ChannelEditXDSFill().

◆ IsPaused()

bool MythPlayer::IsPaused ( void  ) const
inline

◆ GetRawAudioState()

bool MythPlayer::GetRawAudioState ( void  ) const

Definition at line 1719 of file mythplayer.cpp.

◆ GetLimitKeyRepeat()

bool MythPlayer::GetLimitKeyRepeat ( void  ) const
inline

Definition at line 154 of file mythplayer.h.

Referenced by TV::DoSeek().

◆ GetEof()

EofState MythPlayer::GetEof ( void  ) const

◆ IsErrored()

bool MythPlayer::IsErrored ( void  ) const

◆ IsPlaying()

bool MythPlayer::IsPlaying ( std::chrono::milliseconds  wait_in_msec = 0ms,
bool  wait_for = true 
) const

◆ AtNormalSpeed()

bool MythPlayer::AtNormalSpeed ( void  ) const
inline

◆ IsReallyNearEnd()

bool MythPlayer::IsReallyNearEnd ( void  ) const

Returns true iff really near end of recording.

This is used by SwitchToProgram() to determine if we are so close to the end that we need to switch to the next program.

Definition at line 1524 of file mythplayer.cpp.

Referenced by MythPlayerUI::SwitchToProgram().

◆ IsNearEnd()

bool MythPlayer::IsNearEnd ( void  )

Returns true iff near end of recording.

Definition at line 1535 of file mythplayer.cpp.

Referenced by TV::DoEditSchedule(), MythPlayerUI::EventLoop(), TV::HandleOSDVideoExit(), TV::PrepareToExitPlayer(), and TV::ShowOSDPromptDeleteRecording().

◆ HasTVChainNext()

bool MythPlayer::HasTVChainNext ( void  ) const

Definition at line 1707 of file mythplayer.cpp.

Referenced by PosMapFromEnc().

◆ IsWatchingInprogress()

bool MythPlayer::IsWatchingInprogress ( void  ) const

◆ GetInteractiveTV()

virtual InteractiveTV* MythPlayer::GetInteractiveTV ( )
inlinevirtual

◆ GetVideoOutput()

MythVideoOutput* MythPlayer::GetVideoOutput ( void  )
inline

◆ SwitchTitle()

virtual bool MythPlayer::SwitchTitle ( int  )
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 169 of file mythplayer.h.

Referenced by TV::DoSwitchTitle().

◆ NextTitle()

virtual bool MythPlayer::NextTitle ( void  )
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 170 of file mythplayer.h.

◆ PrevTitle()

virtual bool MythPlayer::PrevTitle ( void  )
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 171 of file mythplayer.h.

◆ SwitchAngle()

virtual bool MythPlayer::SwitchAngle ( int  )
inlinevirtual

Reimplemented in MythBDPlayer, and MythDVDPlayer.

Definition at line 174 of file mythplayer.h.

Referenced by TV::DoSwitchAngle().

◆ NextAngle()

virtual bool MythPlayer::NextAngle ( void  )
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 175 of file mythplayer.h.

◆ PrevAngle()

virtual bool MythPlayer::PrevAngle ( void  )
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 176 of file mythplayer.h.

◆ GetNextVideoFrame()

MythVideoFrame * MythPlayer::GetNextVideoFrame ( void  )

Removes a frame from the available queue for decoding onto.

This places the frame in the limbo queue, from which frames are removed if they are added to another queue. Normally a frame is freed from limbo either by a ReleaseNextVideoFrame() or DiscardVideoFrame() call; but limboed frames are also freed during a seek reset.

Definition at line 588 of file mythplayer.cpp.

Referenced by AvFormatDecoder::GenerateDummyVideoFrames(), get_avf_buffer_dxva2(), and AvFormatDecoder::ProcessVideoFrame().

◆ DeLimboFrame()

void MythPlayer::DeLimboFrame ( MythVideoFrame frame)

◆ ReleaseNextVideoFrame()

void MythPlayer::ReleaseNextVideoFrame ( MythVideoFrame buffer,
std::chrono::milliseconds  timecode,
bool  wrap = true 
)
virtual

Places frame on the queue of frames ready for display.

Reimplemented in MythDVDPlayer.

Definition at line 598 of file mythplayer.cpp.

Referenced by AvFormatDecoder::GenerateDummyVideoFrames(), AvFormatDecoder::ProcessVideoFrame(), and MythDVDPlayer::ReleaseNextVideoFrame().

◆ DiscardVideoFrame()

void MythPlayer::DiscardVideoFrame ( MythVideoFrame buffer)

◆ DiscardVideoFrames()

void MythPlayer::DiscardVideoFrames ( bool  KeyFrame,
bool  Flushed 
)

Places frames in the available frames queue.

If called with 'Keyframe' set to false then all frames not in use by the decoder are made available for decoding. Otherwise, all frames are made available for decoding; this is only safe if the next frame is a keyframe.

Parameters
Keyframeif this is true all frames are placed in the available queue.
Flushedindicates that the decoder has been flushed AND the decoder requires ALL frames to be released (used for VAAPI and VDPAU pause frames)

Definition at line 648 of file mythplayer.cpp.

Referenced by DecoderEnd(), MythVTBContext::InitFramesContext(), MythNVDECContext::InitFramesContext(), MythPlayerUI::JumpToProgram(), PrebufferEnoughFrames(), MythDVDDecoder::ReadPacket(), AvFormatDecoder::SeekReset(), and MythPlayerUI::SwitchToProgram().

◆ GetDecoder() [1/2]

DecoderBase* MythPlayer::GetDecoder ( void  )
inline

◆ HasReachedEof()

bool MythPlayer::HasReachedEof ( void  ) const
virtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 659 of file mythplayer.cpp.

Referenced by MythPlayerUI::EventLoop().

◆ SetDisablePassThrough()

void MythPlayer::SetDisablePassThrough ( bool  disabled)

Definition at line 2002 of file mythplayer.cpp.

Referenced by syncWithAudioStretch().

◆ ForceSetupAudioStream()

void MythPlayer::ForceSetupAudioStream ( void  )

Definition at line 2008 of file mythplayer.cpp.

Referenced by MythPlayerAudioUI::EnableUpmix().

◆ PrepareAudioSample()

bool MythPlayer::PrepareAudioSample ( std::chrono::milliseconds &  timecode)
virtual

Reimplemented in MythDVDPlayer.

Definition at line 1306 of file mythplayer.cpp.

Referenced by AudioPlayer::AddAudioData().

◆ GetCC708Reader()

virtual CC708Reader* MythPlayer::GetCC708Reader ( uint  = 0)
inlinevirtual

Reimplemented in MythCCExtractorPlayer.

Definition at line 195 of file mythplayer.h.

Referenced by SubtitleScreen::Create().

◆ GetCC608Reader()

virtual CC608Reader* MythPlayer::GetCC608Reader ( uint  = 0)
inlinevirtual

Reimplemented in MythCCExtractorPlayer.

Definition at line 196 of file mythplayer.h.

Referenced by SubtitleScreen::Create().

◆ GetSubReader()

virtual SubtitleReader* MythPlayer::GetSubReader ( uint  = 0)
inlinevirtual

◆ GetTeletextReader()

virtual TeletextReader* MythPlayer::GetTeletextReader ( uint  = 0)
inlinevirtual

Reimplemented in MythCCExtractorPlayer.

Definition at line 198 of file mythplayer.h.

Referenced by TeletextScreen::Create().

◆ EnableForcedSubtitles()

void MythPlayer::EnableForcedSubtitles ( bool  enable)

Definition at line 679 of file mythplayer.cpp.

Referenced by AvFormatDecoder::ProcessSubtitlePacket().

◆ GetAllowForcedSubtitles()

bool MythPlayer::GetAllowForcedSubtitles ( void  ) const
inline

◆ CheckTVChain()

void MythPlayer::CheckTVChain ( )

◆ FileChangedCallback()

void MythPlayer::FileChangedCallback ( )

Definition at line 938 of file mythplayer.cpp.

Referenced by DecoderBase::FileChanged().

◆ GetNumChapters()

int MythPlayer::GetNumChapters ( void  )
virtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 1818 of file mythplayer.cpp.

Referenced by DoJumpChapter(), TV::GetNumChapters(), and MythPlayerOverlayUI::UpdateSliderInfo().

◆ GetCurrentChapter()

int MythPlayer::GetCurrentChapter ( void  )
virtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 1825 of file mythplayer.cpp.

Referenced by DoJumpChapter(), TV::GetCurrentChapter(), and MythPlayerOverlayUI::UpdateSliderInfo().

◆ GetChapterTimes()

void MythPlayer::GetChapterTimes ( QList< std::chrono::seconds > &  times)
virtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 1832 of file mythplayer.cpp.

Referenced by TV::GetChapterTimes(), and TV::GetStatus().

◆ GetNumTitles()

virtual int MythPlayer::GetNumTitles ( void  ) const
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 218 of file mythplayer.h.

Referenced by TV::GetNumTitles(), and MythPlayerOverlayUI::UpdateSliderInfo().

◆ GetCurrentTitle()

virtual int MythPlayer::GetCurrentTitle ( void  ) const
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 219 of file mythplayer.h.

Referenced by TV::GetCurrentTitle(), and MythPlayerOverlayUI::UpdateSliderInfo().

◆ GetTitleDuration()

virtual std::chrono::seconds MythPlayer::GetTitleDuration ( int  ) const
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 220 of file mythplayer.h.

Referenced by TV::GetTitleDuration().

◆ GetTitleName()

virtual QString MythPlayer::GetTitleName ( int  ) const
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 221 of file mythplayer.h.

Referenced by TV::GetTitleName().

◆ GetNumAngles()

virtual int MythPlayer::GetNumAngles ( void  ) const
inlinevirtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 224 of file mythplayer.h.

Referenced by TV::GetNumAngles(), and MythPlayerOverlayUI::UpdateSliderInfo().

◆ GetCurrentAngle()

virtual int MythPlayer::GetCurrentAngle ( void  ) const
inlinevirtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 225 of file mythplayer.h.

Referenced by TV::GetCurrentAngle(), and MythPlayerOverlayUI::UpdateSliderInfo().

◆ GetAngleName()

virtual QString MythPlayer::GetAngleName ( int  ) const
inlinevirtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 226 of file mythplayer.h.

Referenced by TV::GetAngleName().

◆ IsInStillFrame()

virtual bool MythPlayer::IsInStillFrame ( ) const
inlinevirtual

Reimplemented in MythDVDPlayer.

Definition at line 229 of file mythplayer.h.

Referenced by UnpauseDecoder().

◆ PosMapFromEnc()

bool MythPlayer::PosMapFromEnc ( uint64_t  start,
frm_pos_map_t posMap,
frm_pos_map_t durMap 
)

Definition at line 1906 of file mythplayer.cpp.

Referenced by DecoderBase::PosMapFromEnc().

◆ SaveTotalDuration()

void MythPlayer::SaveTotalDuration ( void  )

◆ ResetTotalDuration()

void MythPlayer::ResetTotalDuration ( void  )

Definition at line 1972 of file mythplayer.cpp.

Referenced by CommDetector2::go(), and ClassicCommDetector::go().

◆ SaveTotalFrames()

void MythPlayer::SaveTotalFrames ( void  )

Definition at line 1980 of file mythplayer.cpp.

Referenced by MythCommFlagPlayer::RebuildSeekTable().

◆ SetErrored()

void MythPlayer::SetErrored ( const QString &  reason)

◆ OpenDummy()

void MythPlayer::OpenDummy ( void  )
protected

◆ CalcMaxFFTime()

long long MythPlayer::CalcMaxFFTime ( long long  ffframes,
bool  setjump = true 
) const
protectedvirtual

CalcMaxFFTime(ffframes): forward ffframes forward.

Handle livetv transitions if necessay

Reimplemented in MythDVDPlayer.

Definition at line 1447 of file mythplayer.cpp.

Referenced by MythDVDPlayer::CalcMaxFFTime(), DoFFRewSkip(), MythPlayerUI::EventLoop(), FastForward(), and JumpToFrame().

◆ CalcRWTime()

long long MythPlayer::CalcRWTime ( long long  rw) const
protected

CalcRWTime(rw): rewind rw frames back.

Handle livetv transitions if necessary

Definition at line 1427 of file mythplayer.cpp.

Referenced by DoFFRewSkip(), MythPlayerUI::EventLoop(), and Rewind().

◆ TranslatePositionFrameToMs()

std::chrono::milliseconds MythPlayer::TranslatePositionFrameToMs ( uint64_t  position,
bool  use_cutlist 
) const
protected

◆ TranslatePositionMsToFrame()

uint64_t MythPlayer::TranslatePositionMsToFrame ( std::chrono::milliseconds  position,
bool  use_cutlist 
) const
inlineprotected

◆ TranslatePositionAbsToRel()

uint64_t MythPlayer::TranslatePositionAbsToRel ( uint64_t  position) const
inlineprotected

Definition at line 266 of file mythplayer.h.

Referenced by TV::SeekHandleAction().

◆ TranslatePositionRelToAbs()

uint64_t MythPlayer::TranslatePositionRelToAbs ( uint64_t  position) const
inlineprotected

Definition at line 269 of file mythplayer.h.

Referenced by TV::SeekHandleAction().

◆ ComputeSecs()

float MythPlayer::ComputeSecs ( uint64_t  position,
bool  use_cutlist 
) const
inlineprotected

◆ FindFrame()

uint64_t MythPlayer::FindFrame ( float  offset,
bool  use_cutlist 
) const
protected

◆ SetAutoCommercialSkip()

void MythPlayer::SetAutoCommercialSkip ( CommSkipMode  autoskip)
inlineprotected

Definition at line 278 of file mythplayer.h.

Referenced by TV::SetAutoCommercialSkip().

◆ SkipCommercials()

void MythPlayer::SkipCommercials ( int  direction)
inlineprotected

Definition at line 280 of file mythplayer.h.

Referenced by TV::DoSkipCommercials().

◆ SetCommBreakMap()

void MythPlayer::SetCommBreakMap ( const frm_dir_map_t NewMap)
protected

Definition at line 1733 of file mythplayer.cpp.

Referenced by TV::customEvent().

◆ GetAutoCommercialSkip()

CommSkipMode MythPlayer::GetAutoCommercialSkip ( void  )
inlineprotected

Definition at line 283 of file mythplayer.h.

Referenced by TV::PlaybackMenuInit(), and TV::SetAutoCommercialSkip().

◆ ResetPlaying()

void MythPlayer::ResetPlaying ( bool  resetframes = true)
protectedvirtual

◆ StopPlaying()

void MythPlayer::StopPlaying ( void  )
protectedvirtual

Definition at line 944 of file mythplayer.cpp.

Referenced by PlayerContext::StopPlaying().

◆ PauseDecoder()

bool MythPlayer::PauseDecoder ( void  )
protected

◆ UnpauseDecoder()

void MythPlayer::UnpauseDecoder ( void  )
protected

Definition at line 989 of file mythplayer.cpp.

Referenced by DecoderPauseCheck(), Play(), and MythPlayerUI::StartPlaying().

◆ Pause()

bool MythPlayer::Pause ( void  )
protected

◆ Play()

bool MythPlayer::Play ( float  speed = 1.0,
bool  normal = true,
bool  unpauseaudio = true 
)
protected

◆ FastForward()

bool MythPlayer::FastForward ( float  seconds)
protectedvirtual

Reimplemented in MythDVDPlayer.

Definition at line 836 of file mythplayer.cpp.

Referenced by TV::DoPlayerSeek(), and MythDVDPlayer::FastForward().

◆ Rewind()

bool MythPlayer::Rewind ( float  seconds)
protectedvirtual

Reimplemented in MythDVDPlayer.

Definition at line 866 of file mythplayer.cpp.

Referenced by TV::DoPlayerSeek(), and MythDVDPlayer::Rewind().

◆ JumpToFrame()

bool MythPlayer::JumpToFrame ( uint64_t  frame)
protectedvirtual

◆ JumpChapter()

void MythPlayer::JumpChapter ( int  chapter)
protected

Definition at line 910 of file mythplayer.cpp.

Referenced by TV::DoJumpChapter().

◆ PrebufferEnoughFrames()

bool MythPlayer::PrebufferEnoughFrames ( int  min_buffers = 0)
protectedvirtual

Reimplemented in MythDVDPlayer.

Definition at line 723 of file mythplayer.cpp.

Referenced by MythPlayerUI::DisplayNormalFrame(), and MythDVDPlayer::PrebufferEnoughFrames().

◆ SetBuffering()

void MythPlayer::SetBuffering ( bool  new_buffering)
protected

◆ VideoEnd()

void MythPlayer::VideoEnd ( void  )
protectedvirtual

Definition at line 828 of file mythplayer.cpp.

Referenced by StopPlaying().

◆ DecoderStart()

void MythPlayer::DecoderStart ( bool  start_paused)
protectedvirtual

◆ DecoderLoop()

void MythPlayer::DecoderLoop ( bool  pause)
protectedvirtual

Definition at line 1098 of file mythplayer.cpp.

Referenced by MythDecoderThread::run().

◆ DecoderEnd()

void MythPlayer::DecoderEnd ( void  )
protectedvirtual

Definition at line 1034 of file mythplayer.cpp.

Referenced by StopPlaying().

◆ DecoderPauseCheck()

void MythPlayer::DecoderPauseCheck ( void  )
protectedvirtual

Reimplemented in MythDVDPlayer.

Definition at line 1055 of file mythplayer.cpp.

Referenced by DecoderLoop(), MythDVDPlayer::DecoderPauseCheck(), and Pause().

◆ AudioEnd()

void MythPlayer::AudioEnd ( void  )
protectedvirtual

Definition at line 960 of file mythplayer.cpp.

Referenced by StopPlaying().

◆ GetEditMode()

bool MythPlayer::GetEditMode ( void  ) const
inlineprotected

Definition at line 315 of file mythplayer.h.

Referenced by TV::DoTogglePause(), and HasReachedEof().

◆ IsInDelete()

bool MythPlayer::IsInDelete ( uint64_t  frame)
protected

Definition at line 1702 of file mythplayer.cpp.

Referenced by DoFastForward(), and MythPreviewPlayer::SeekForScreenGrab().

◆ FlagIsSet()

bool MythPlayer::FlagIsSet ( PlayerFlags  arg)
inlineprotected

◆ SetPlayingInfo()

void MythPlayer::SetPlayingInfo ( const ProgramInfo pginfo)
protected

◆ SetPlaying()

void MythPlayer::SetPlaying ( bool  is_playing)
protected

◆ ResetErrored()

void MythPlayer::ResetErrored ( void  )
protected

Definition at line 1945 of file mythplayer.cpp.

Referenced by TV::HandleStateChange().

◆ PauseVideo()

void MythPlayer::PauseVideo ( void  )
protected

Definition at line 219 of file mythplayer.cpp.

Referenced by Pause(), MythBDPlayer::VideoLoop(), and MythDVDPlayer::VideoLoop().

◆ UnpauseVideo()

void MythPlayer::UnpauseVideo ( void  )
protected

Definition at line 227 of file mythplayer.cpp.

Referenced by Play(), MythBDPlayer::VideoLoop(), and MythDVDPlayer::VideoLoop().

◆ PauseBuffer()

void MythPlayer::PauseBuffer ( void  )
protected

Definition at line 135 of file mythplayer.cpp.

Referenced by Pause().

◆ UnpauseBuffer()

void MythPlayer::UnpauseBuffer ( void  )
protected

Definition at line 147 of file mythplayer.cpp.

Referenced by OpenFile(), and Play().

◆ CreateDecoder()

void MythPlayer::CreateDecoder ( TestBufferVec TestBuffer)
protectedvirtual

Reimplemented in MythBDPlayer, and MythDVDPlayer.

Definition at line 414 of file mythplayer.cpp.

Referenced by OpenFile().

◆ SetDecoder()

void MythPlayer::SetDecoder ( DecoderBase dec)
protected

Sets the stream decoder, deleting any existing recorder.

Definition at line 1886 of file mythplayer.cpp.

Referenced by MythBDPlayer::CreateDecoder(), MythDVDPlayer::CreateDecoder(), CreateDecoder(), DecoderEnd(), OpenDummy(), OpenFile(), and ~MythPlayer().

◆ GetDecoder() [2/2]

const DecoderBase* MythPlayer::GetDecoder ( void  ) const
inlineprotected

Returns the stream decoder currently in use.

Definition at line 336 of file mythplayer.h.

◆ DoFFRewSkip()

void MythPlayer::DoFFRewSkip ( void  )
protectedvirtual

Reimplemented in MythDVDPlayer.

Definition at line 1167 of file mythplayer.cpp.

Referenced by DecoderGetFrame(), and MythDVDPlayer::DoFFRewSkip().

◆ DecoderGetFrame()

bool MythPlayer::DecoderGetFrame ( DecodeType  decodetype,
bool  unsafe = false 
)
protected

◆ DoGetFrame()

bool MythPlayer::DoGetFrame ( DecodeType  Type)
protected

Get one frame from the decoder.

Certain decoders operate asynchronously and will return EAGAIN if a video frame is not yet ready. We handle the retries in the following DecoderLoop passes. This lets us abort retries if we need to pause or stop the decoder.

This is most relevant for MediaCodec decoding when using direct rendering as there are a limited number of decoder output buffers that are retained by the VideoOutput classes (VideoOutput and VideoBuffers) until they have been used.

Note
The caller must hold m_decoderChangeLock.

Definition at line 1286 of file mythplayer.cpp.

Referenced by DecoderGetFrame(), and MythTranscodePlayer::TranscodeGetNextFrame().

◆ UpdateFFRewSkip()

bool MythPlayer::UpdateFFRewSkip ( float  ffrewScale = 1.0F)
protected

◆ ChangeSpeed()

void MythPlayer::ChangeSpeed ( void  )
protectedvirtual

Reimplemented in MythDVDPlayer, and MythPlayerUI.

Definition at line 1370 of file mythplayer.cpp.

Referenced by MythPlayerUI::ChangeSpeed().

◆ DoFastForward()

bool MythPlayer::DoFastForward ( uint64_t  frames,
double  inaccuracy 
)
protected

◆ DoRewind()

bool MythPlayer::DoRewind ( uint64_t  frames,
double  inaccuracy 
)
protected

◆ DoJumpToFrame()

void MythPlayer::DoJumpToFrame ( uint64_t  frame,
double  inaccuracy 
)
protected

◆ WaitForSeek()

void MythPlayer::WaitForSeek ( uint64_t  frame,
uint64_t  seeksnap_wanted 
)
protected

◆ ClearAfterSeek()

void MythPlayer::ClearAfterSeek ( bool  clearvideobuffers = true)
protected

This is to support seeking...

This resets the output classes and discards all frames no longer being used by the decoder class.

Note: caller should not hold any locks

Parameters
clearvideobuffersThis clears the videooutput buffers as well, this is only safe if no old frames are required to continue decoding.

Definition at line 1679 of file mythplayer.cpp.

Referenced by DoFastForward(), MythDVDPlayer::DoJumpChapter(), DoRewind(), MythCommFlagPlayer::GetRawVideoFrame(), MythPreviewPlayer::GetScreenGrabAtFrame(), MythTranscodePlayer::InitForTranscode(), MythCommFlagPlayer::RebuildSeekTable(), ReinitVideo(), ResetPlaying(), MythCCExtractorPlayer::run(), MythTranscodePlayer::TranscodeGetNextFrame(), MythDVDPlayer::VideoLoop(), and MythPlayerUI::VideoStart().

◆ DoJumpChapter()

bool MythPlayer::DoJumpChapter ( int  chapter)
protectedvirtual

Reimplemented in MythDVDPlayer.

Definition at line 1838 of file mythplayer.cpp.

Referenced by MythPlayerUI::EventLoop().

◆ GetChapter()

int64_t MythPlayer::GetChapter ( int  chapter)
protectedvirtual

Reimplemented in MythBDPlayer.

Definition at line 1876 of file mythplayer.cpp.

Referenced by DoJumpChapter().

◆ WrapTimecode()

void MythPlayer::WrapTimecode ( std::chrono::milliseconds &  timecode,
TCTypes  tc_type 
)
protected

◆ SetFrameInterval()

void MythPlayer::SetFrameInterval ( FrameScanType  scan,
double  frame_period 
)
protected

Definition at line 687 of file mythplayer.cpp.

Referenced by MythPlayerUI::InitFrameInterval(), SetFrameRate(), and SetVideoParams().

◆ syncWithAudioStretch()

void MythPlayer::syncWithAudioStretch ( )
private

Definition at line 1988 of file mythplayer.cpp.

Referenced by ChangeSpeed(), and SetDecoder().

Friends And Related Function Documentation

◆ PlayerContext

friend class PlayerContext
friend

Definition at line 88 of file mythplayer.h.

◆ CC708Reader

friend class CC708Reader
friend

Definition at line 89 of file mythplayer.h.

Referenced by MythCCExtractorPlayer::GetCC708Reader().

◆ CC608Reader

friend class CC608Reader
friend

Definition at line 90 of file mythplayer.h.

Referenced by MythCCExtractorPlayer::GetCC608Reader().

◆ MythDecoderThread

friend class MythDecoderThread
friend

Definition at line 91 of file mythplayer.h.

Referenced by DecoderStart().

◆ VideoPerformanceTest

friend class VideoPerformanceTest
friend

Definition at line 92 of file mythplayer.h.

◆ TV

friend class TV
friend

Definition at line 94 of file mythplayer.h.

◆ Transcode

friend class Transcode
friend

Definition at line 95 of file mythplayer.h.

Member Data Documentation

◆ kNightModeBrightenssAdjustment

const int MythPlayer::kNightModeBrightenssAdjustment = 10
static

Definition at line 237 of file mythplayer.h.

◆ kNightModeContrastAdjustment

const int MythPlayer::kNightModeContrastAdjustment = 10
static

Definition at line 238 of file mythplayer.h.

◆ kInaccuracyNone

const double MythPlayer::kInaccuracyNone = 0
static

◆ kInaccuracyDefault

const double MythPlayer::kInaccuracyDefault = 0.1
static

Definition at line 240 of file mythplayer.h.

Referenced by MythPlayerUI::EventLoop().

◆ kInaccuracyEditor

const double MythPlayer::kInaccuracyEditor = 0.5
static

Definition at line 241 of file mythplayer.h.

Referenced by MythPlayerEditorUI::HandleProgramEditorActions().

◆ kInaccuracyFull

const double MythPlayer::kInaccuracyFull = -1.0
static

◆ kSeekToEndOffset

const double MythPlayer::kSeekToEndOffset = 1.0
static

Definition at line 243 of file mythplayer.h.

Referenced by CalcMaxFFTime(), and FastForward().

◆ m_decoder

DecoderBase* MythPlayer::m_decoder {nullptr}
protected

Definition at line 362 of file mythplayer.h.

Referenced by MythDVDPlayer::AutoDeint(), MythPlayerCaptionsUI::ChangeCaptionTrack(), MythDVDPlayer::ChangeSpeed(), MythPlayerCaptionsUI::ChangeTrack(), DecoderGetFrame(), DecoderLoop(), MythPlayerCaptionsUI::DisableCaptions(), MythPlayerUI::DisplayNormalFrame(), MythDVDPlayer::DoFFRewSkip(), DoFFRewSkip(), DoGetFrame(), MythDVDPlayer::DoJumpChapter(), MythPlayerCaptionsUI::EnableCaptions(), MythDVDPlayer::EnableCaptions(), MythPlayerUI::EventLoop(), MythDVDPlayer::FastForward(), FastForward(), MythPlayerUI::FileChanged(), ForceSetupAudioStream(), GetChapter(), GetChapterTimes(), MythPlayerUI::GetCodecDescription(), GetCurrentChapter(), GetEncodingType(), GetEof(), GetNumChapters(), MythPlayerUI::GetPlaybackData(), GetRawAudioState(), MythPlayerCaptionsUI::GetTrack(), MythPlayerCaptionsUI::GetTrackCount(), MythPlayerCaptionsUI::GetTracks(), GetXDS(), MythPlayerCaptionsUI::HasCaptionTrack(), MythTranscodePlayer::InitForTranscode(), MythPlayerVideoUI::InitVideo(), InitVideo(), IsNearEnd(), IsReallyNearEnd(), MythDVDPlayer::JumpToFrame(), MythPlayerUI::JumpToProgram(), MythPlayerUI::JumpToStream(), MythCCExtractorPlayer::OnGotNewFrame(), OpenFile(), Pause(), MythCCExtractorPlayer::Process608Captions(), MythCCExtractorPlayer::Process708Captions(), MythCCExtractorPlayer::ProcessDVBSubtitles(), MythCCExtractorPlayer::ProcessTeletext(), MythCommFlagPlayer::RebuildSeekTable(), ReinitVideo(), ResetPlaying(), ResetTotalDuration(), MythDVDPlayer::Rewind(), MythCCExtractorPlayer::run(), MythPlayerCaptionsUI::SafeFPS(), SaveTotalDuration(), SaveTotalFrames(), MythPlayerCaptionsUI::SetAudioByComponentTag(), SetDecoder(), SetDisablePassThrough(), SetEof(), SetFrameInterval(), MythPlayerCaptionsUI::SetTrack(), MythDVDPlayer::SetTrack(), MythTranscodePlayer::SetTranscoding(), MythPlayerCaptionsUI::SetVideoByComponentTag(), SetWatchingRecording(), MythPlayerUI::SwitchToProgram(), syncWithAudioStretch(), MythTranscodePlayer::TranscodeGetNextFrame(), UpdateFFRewSkip(), MythPlayerOverlayUI::UpdateSliderInfo(), MythTranscodePlayer::UpdateStoredFrameNum(), MythPlayerUI::VideoLoop(), MythPlayerUI::VideoStart(), WaitForSeek(), and MythTranscodePlayer::WriteStoredData().

◆ m_decoderChangeLock

QRecursiveMutex MythPlayer::m_decoderChangeLock
mutableprotected

◆ m_videoOutput

MythVideoOutput* MythPlayer::m_videoOutput {nullptr}
protected

◆ m_renderFormats

const VideoFrameTypes* MythPlayer::m_renderFormats { &MythVideoFrame::kDefaultRenderFormats }
protected

Definition at line 365 of file mythplayer.h.

Referenced by MythPlayerVideoUI::InitVideo(), and SetDecoder().

◆ m_playerCtx

PlayerContext* MythPlayer::m_playerCtx {nullptr}
protected

Definition at line 366 of file mythplayer.h.

Referenced by MythDVDPlayer::CalcMaxFFTime(), CalcMaxFFTime(), CalcRWTime(), MythDVDPlayer::ChangeSpeed(), CheckTVChain(), MythBDPlayer::CreateDecoder(), MythDVDPlayer::CreateDecoder(), CreateDecoder(), DecoderLoop(), MythDVDPlayer::DisableCaptions(), MythPlayerEditorUI::DisableEdit(), MythDVDPlayer::DisplayDVDButton(), MythBDPlayer::DisplayMenu(), MythBDPlayer::DisplayPauseFrame(), MythDVDPlayer::DisplayPauseFrame(), DoFastForward(), MythDVDPlayer::DoJumpChapter(), DoRewind(), MythPlayerUI::EnableBitrateMonitor(), MythDVDPlayer::EnableCaptions(), MythPlayerEditorUI::EnableEdit(), MythDVDPlayer::EventEnd(), MythPlayerUI::EventLoop(), MythPlayerUI::EventStart(), MythBDPlayer::EventStart(), MythDVDPlayer::EventStart(), MythPlayerUI::FileChanged(), FindFrame(), MythDVDPlayer::GetBookmark(), MythBDPlayer::GetBookmark(), GetBookmark(), MythBDPlayer::GetChapter(), MythBDPlayer::GetChapterTimes(), MythDVDPlayer::GetChapterTimes(), MythBDPlayer::GetCurrentAngle(), MythDVDPlayer::GetCurrentAngle(), MythBDPlayer::GetCurrentChapter(), MythDVDPlayer::GetCurrentChapter(), GetCurrentFrameCount(), MythBDPlayer::GetCurrentTitle(), MythDVDPlayer::GetMillisecondsPlayed(), MythBDPlayer::GetNumAngles(), MythDVDPlayer::GetNumAngles(), MythBDPlayer::GetNumChapters(), MythDVDPlayer::GetNumChapters(), MythBDPlayer::GetNumTitles(), MythPlayerUI::GetPlaybackData(), MythCommFlagPlayer::GetRawVideoFrame(), MythPreviewPlayer::GetScreenGrabAtFrame(), MythBDPlayer::GetTitleDuration(), MythDVDPlayer::GoToDVDProgram(), MythBDPlayer::GoToMenu(), MythDVDPlayer::GoToMenu(), HasTVChainNext(), MythDVDPlayer::InitialSeek(), MythPlayerVideoUI::InitVideo(), InitVideo(), IsNearEnd(), IsReallyNearEnd(), IsWatchingInprogress(), MythPlayerUI::JumpToProgram(), MythPlayerUI::JumpToStream(), MythPlayerCaptionsUI::LoadExternalSubtitles(), MythPlayer(), MythBDPlayer::NextTitle(), OpenDummy(), OpenFile(), PauseBuffer(), PosMapFromEnc(), MythDVDPlayer::PrepareAudioSample(), MythBDPlayer::PrevTitle(), MythCommFlagPlayer::RebuildSeekTable(), MythDVDPlayer::ReleaseNextVideoFrame(), MythCCExtractorPlayer::run(), MythPreviewPlayer::SeekForScreenGrab(), MythPlayerUI::SetBookmark(), MythBDPlayer::SetBookmark(), MythDVDPlayer::SetBookmark(), MythPlayerUI::SetLastPlayPosition(), SetPlayingInfo(), MythPlayerCaptionsUI::SetStream(), MythDVDPlayer::SetTrack(), MythPlayerUI::SetWatched(), MythDVDPlayer::StillFrameCheck(), MythDVDPlayer::SwitchAngle(), MythBDPlayer::SwitchAngle(), MythBDPlayer::SwitchTitle(), MythPlayerUI::SwitchToProgram(), MythTranscodePlayer::TranscodeGetNextFrame(), TranslatePositionFrameToMs(), UnpauseBuffer(), MythPlayerOverlayUI::UpdateSliderInfo(), MythBDPlayer::VideoLoop(), MythDVDPlayer::VideoLoop(), MythBDPlayer::VideoStart(), MythDVDPlayer::VideoStart(), and WaitForSeek().

◆ m_decoderThread

MythDecoderThread* MythPlayer::m_decoderThread {nullptr}
protected

◆ m_playerThread

QThread* MythPlayer::m_playerThread {nullptr}
protected

Definition at line 368 of file mythplayer.h.

Referenced by GetEof(), MythPlayer(), SetEof(), MythPlayerUI::StartPlaying(), and StopPlaying().

◆ m_playerFlags

PlayerFlags MythPlayer::m_playerFlags
protected

◆ m_decoderThreadPause

QWaitCondition MythPlayer::m_decoderThreadPause
protected

Definition at line 375 of file mythplayer.h.

Referenced by PauseDecoder().

◆ m_decoderThreadUnpause

QWaitCondition MythPlayer::m_decoderThreadUnpause
protected

Definition at line 376 of file mythplayer.h.

Referenced by UnpauseDecoder().

◆ m_decoderPauseLock

QMutex MythPlayer::m_decoderPauseLock
mutableprotected

Definition at line 377 of file mythplayer.h.

Referenced by PauseDecoder(), and UnpauseDecoder().

◆ m_decoderSeekLock

QMutex MythPlayer::m_decoderSeekLock
mutableprotected

Definition at line 378 of file mythplayer.h.

Referenced by DecoderLoop(), and WaitForSeek().

◆ m_bufferPauseLock

QMutex MythPlayer::m_bufferPauseLock
mutableprotected

Definition at line 379 of file mythplayer.h.

Referenced by PauseBuffer(), and UnpauseBuffer().

◆ m_videoPauseLock

QMutex MythPlayer::m_videoPauseLock
mutableprotected

Definition at line 380 of file mythplayer.h.

Referenced by PauseVideo(), and UnpauseVideo().

◆ m_pauseLock

QMutex MythPlayer::m_pauseLock
mutableprotected

Definition at line 381 of file mythplayer.h.

Referenced by Pause(), and Play().

◆ m_decoderSeek

int64_t MythPlayer::m_decoderSeek {-1}
protected

Definition at line 382 of file mythplayer.h.

Referenced by DecoderLoop(), and WaitForSeek().

◆ m_totalDecoderPause

bool MythPlayer::m_totalDecoderPause {false}
protected

Definition at line 383 of file mythplayer.h.

Referenced by DecoderLoop(), and SetDecoder().

◆ m_decoderPaused

bool MythPlayer::m_decoderPaused {false}
protected

Definition at line 384 of file mythplayer.h.

Referenced by DecoderLoop(), DecoderStart(), Pause(), PauseDecoder(), and UnpauseDecoder().

◆ m_inJumpToProgramPause

bool MythPlayer::m_inJumpToProgramPause {false}
protected

Definition at line 385 of file mythplayer.h.

Referenced by DecoderLoop(), and MythPlayerUI::JumpToProgram().

◆ m_pauseDecoder

bool MythPlayer::m_pauseDecoder {false}
protected

Definition at line 386 of file mythplayer.h.

Referenced by DecoderGetFrame(), DecoderPauseCheck(), and PauseDecoder().

◆ m_unpauseDecoder

bool MythPlayer::m_unpauseDecoder {false}
protected

Definition at line 387 of file mythplayer.h.

Referenced by DecoderPauseCheck(), and UnpauseDecoder().

◆ m_killDecoder

bool volatile MythPlayer::m_killDecoder {false}
protected

◆ m_decodeOneFrame

bool MythPlayer::m_decodeOneFrame {false}
protected

◆ m_renderOneFrame

bool MythPlayer::m_renderOneFrame {false}
protected

◆ m_needNewPauseFrame

bool MythPlayer::m_needNewPauseFrame {false}
protected

◆ m_bufferPaused

bool MythPlayer::m_bufferPaused {false}
protected

Definition at line 392 of file mythplayer.h.

Referenced by Pause(), PauseBuffer(), and UnpauseBuffer().

◆ m_videoPaused

bool MythPlayer::m_videoPaused {false}
protected

◆ m_allPaused

bool MythPlayer::m_allPaused {false}
protected

◆ m_playing

bool MythPlayer::m_playing {false}
protected

Definition at line 395 of file mythplayer.h.

Referenced by IsPlaying(), and SetPlaying().

◆ m_playingWaitCond

QWaitCondition MythPlayer::m_playingWaitCond
mutableprotected

Definition at line 397 of file mythplayer.h.

Referenced by IsPlaying(), and SetPlaying().

◆ m_vidExitLock

QMutex MythPlayer::m_vidExitLock
mutableprotected

Definition at line 398 of file mythplayer.h.

Referenced by ReinitVideo(), VideoEnd(), and ~MythPlayer().

◆ m_playingLock

QMutex MythPlayer::m_playingLock
mutableprotected

Definition at line 399 of file mythplayer.h.

Referenced by IsPlaying(), and SetPlaying().

◆ m_errorLock

QMutex MythPlayer::m_errorLock
mutableprotected

Definition at line 400 of file mythplayer.h.

Referenced by GetError(), IsErrored(), ResetErrored(), and SetErrored().

◆ m_errorMsg

QString MythPlayer::m_errorMsg
protected

Reason why NVP exited with a error.

Definition at line 401 of file mythplayer.h.

Referenced by GetError(), IsErrored(), ResetErrored(), and SetErrored().

◆ m_errorType

int MythPlayer::m_errorType {kError_None}
protected

Definition at line 402 of file mythplayer.h.

Referenced by SetErrored().

◆ m_liveTV

bool MythPlayer::m_liveTV {false}
protected

◆ m_watchingRecording

bool MythPlayer::m_watchingRecording {false}
protected

◆ m_transcoding

bool MythPlayer::m_transcoding {false}
protected

Definition at line 405 of file mythplayer.h.

Referenced by DecoderLoop(), OpenFile(), and MythTranscodePlayer::SetTranscoding().

◆ m_hasFullPositionMap

bool MythPlayer::m_hasFullPositionMap {false}
protected

◆ m_limitKeyRepeat

bool MythPlayer::m_limitKeyRepeat {false}
mutableprotected

Definition at line 407 of file mythplayer.h.

Referenced by CalcMaxFFTime(), and DoRewind().

◆ m_jumpChapter

int MythPlayer::m_jumpChapter {0}
protected

◆ m_bookmarkSeek

uint64_t MythPlayer::m_bookmarkSeek {0}
protected

◆ m_endExitPrompt

int MythPlayer::m_endExitPrompt
protected

Definition at line 414 of file mythplayer.h.

Referenced by MythPlayerUI::EventLoop(), and MythPlayer().

◆ m_ffTime

long long MythPlayer::m_ffTime {0}
protected

If m_ffTime>0, number of frames to seek forward.

If m_ffTime<0, number of frames to seek backward.

Definition at line 419 of file mythplayer.h.

Referenced by ChangeSpeed(), DoFastForward(), MythPlayerUI::EventLoop(), FastForward(), JumpToFrame(), and MythPlayerUI::StartPlaying().

◆ m_videobufRetries

int MythPlayer::m_videobufRetries {0}
protected

How often we have tried to wait for a video output buffer and failed.

Definition at line 423 of file mythplayer.h.

Referenced by DecoderGetFrame().

◆ m_framesPlayed

uint64_t MythPlayer::m_framesPlayed {0}
protected

◆ m_totalFrames

uint64_t MythPlayer::m_totalFrames {0}
protected

◆ m_totalLength

std::chrono::seconds MythPlayer::m_totalLength {0s}
protected

◆ m_totalDuration

std::chrono::seconds MythPlayer::m_totalDuration {0s}
protected

◆ m_rewindTime

long long MythPlayer::m_rewindTime {0}
protected

◆ m_latestVideoTimecode

std::chrono::milliseconds MythPlayer::m_latestVideoTimecode {-1ms}
protected

Definition at line 429 of file mythplayer.h.

Referenced by MythPlayerUI::RefreshPauseFrame(), and ReleaseNextVideoFrame().

◆ m_avSync

MythPlayerAVSync MythPlayer::m_avSync
protected

◆ m_videoFrameRate

double MythPlayer::m_videoFrameRate {29.97}
protected

◆ m_codecName

QString MythPlayer::m_codecName
protected

Codec Name - used by playback profile.

Definition at line 437 of file mythplayer.h.

Referenced by MythPlayerVideoUI::InitVideo(), and SetVideoParams().

◆ m_videoDispDim

QSize MythPlayer::m_videoDispDim {0,0}
protected

◆ m_videoDim

QSize MythPlayer::m_videoDim {0,0}
protected

◆ m_maxReferenceFrames

int MythPlayer::m_maxReferenceFrames {0}
protected

Number of reference frames used in the video stream.

Definition at line 440 of file mythplayer.h.

Referenced by MythPlayerVideoUI::InitVideo(), ReinitVideo(), and SetVideoParams().

◆ m_videoAspect

float MythPlayer::m_videoAspect {4.0F / 3.0F}
protected

◆ m_forcedVideoAspect

float MythPlayer::m_forcedVideoAspect {-1}
protected

Definition at line 442 of file mythplayer.h.

Referenced by ReinitVideo().

◆ m_keyframeDist

uint MythPlayer::m_keyframeDist {30}
protected

Video (input) Number of frames between key frames (often inaccurate)

Definition at line 445 of file mythplayer.h.

Referenced by MythPlayerUI::EventLoop(), MythTranscodePlayer::InitForTranscode(), and SetKeyframeDistance().

◆ m_buffering

bool MythPlayer::m_buffering {false}
protected

Definition at line 448 of file mythplayer.h.

Referenced by SetBuffering().

◆ m_bufferingStart

QTime MythPlayer::m_bufferingStart
protected

Definition at line 449 of file mythplayer.h.

Referenced by PrebufferEnoughFrames(), and SetBuffering().

◆ m_bufferingLastMsg

QTime MythPlayer::m_bufferingLastMsg
protected

Definition at line 450 of file mythplayer.h.

Referenced by PrebufferEnoughFrames(), and SetBuffering().

◆ m_vbiMode

uint MythPlayer::m_vbiMode {VBIMode::None}
protected

VBI decoder to use.

Definition at line 454 of file mythplayer.h.

Referenced by MythPlayer(), and MythPlayerCaptionsUI::NextCaptionTrack().

◆ m_ttPageNum

int MythPlayer::m_ttPageNum {0x888}
protected

VBI page to display when in PAL vbimode.

Definition at line 455 of file mythplayer.h.

Referenced by MythPlayerCaptionsUI::EnableCaptions(), MythPlayer(), and MythPlayerCaptionsUI::SetTeletextPage().

◆ m_subReader

SubtitleReader MythPlayer::m_subReader
protected

◆ m_ttxReader

TeletextReader MythPlayer::m_ttxReader
protected

Definition at line 459 of file mythplayer.h.

◆ m_captionsEnabledbyDefault

bool MythPlayer::m_captionsEnabledbyDefault {false}
protected

This allows us to enable captions/subtitles later if the streams are not immediately available when the video starts playing.

Definition at line 462 of file mythplayer.h.

Referenced by MythPlayer(), and MythPlayerUI::VideoStart().

◆ m_enableForcedSubtitles

bool MythPlayer::m_enableForcedSubtitles {false}
protected

◆ m_disableForcedSubtitles

bool MythPlayer::m_disableForcedSubtitles {false}
protected

◆ m_allowForcedSubtitles

bool MythPlayer::m_allowForcedSubtitles {true}
protected

◆ m_cc608

CC608Reader MythPlayer::m_cc608
protected

◆ m_cc708

CC708Reader MythPlayer::m_cc708
protected

Definition at line 469 of file mythplayer.h.

Referenced by MythPlayerCaptionsUI::SetTrack().

◆ m_audio

AudioPlayer MythPlayer::m_audio
protected

◆ m_commBreakMap

CommBreakMap MythPlayer::m_commBreakMap
protected

◆ m_forcePositionMapSync

bool MythPlayer::m_forcePositionMapSync {false}
protected

◆ m_deleteMap

DeleteMap MythPlayer::m_deleteMap
protected

◆ m_decoderLock

QRecursiveMutex MythPlayer::m_decoderLock
protected

Lock for next_play_speed and next_normal_speed.

Definition at line 482 of file mythplayer.h.

◆ m_nextPlaySpeed

float MythPlayer::m_nextPlaySpeed {1.0F}
protected

◆ m_playSpeed

float MythPlayer::m_playSpeed {1.0F}
protected

◆ m_frameInterval

std::chrono::microseconds MythPlayer::m_frameInterval {microsecondsFromFloat(1000000.0F / 30)}
protected

◆ m_fpsMultiplier

int MythPlayer::m_fpsMultiplier {1}
protected

used to detect changes

Definition at line 487 of file mythplayer.h.

Referenced by MythPlayerUI::DisplayNormalFrame(), SetFrameInterval(), and UpdateFFRewSkip().

◆ m_ffrewSkip

int MythPlayer::m_ffrewSkip {1}
protected

◆ m_ffrewAdjust

int MythPlayer::m_ffrewAdjust {0}
protected

offset after last skip

Definition at line 489 of file mythplayer.h.

Referenced by DoFFRewSkip(), and UpdateFFRewSkip().

◆ m_ffrewScale

float MythPlayer::m_ffrewScale {1.0F}
protected

scale skip for large gops

Definition at line 490 of file mythplayer.h.

Referenced by DoFFRewSkip(), and UpdateFFRewSkip().

◆ m_fileChanged

bool MythPlayer::m_fileChanged {false}
protected

◆ m_nextNormalSpeed

bool MythPlayer::m_nextNormalSpeed {true}
protected

Definition at line 492 of file mythplayer.h.

Referenced by ChangeSpeed(), Pause(), and Play().

◆ m_normalSpeed

bool MythPlayer::m_normalSpeed {true}
protected

Definition at line 493 of file mythplayer.h.

Referenced by ChangeSpeed(), DecoderLoop(), and MythPlayerUI::DisplayNormalFrame().

◆ m_tcWrap

tctype_arr MythPlayer::m_tcWrap {}
protected

◆ m_savedAudioTimecodeOffset

std::chrono::milliseconds MythPlayer::m_savedAudioTimecodeOffset {0ms}
protected

◆ m_isDummy

bool MythPlayer::m_isDummy {false}
protected

◆ m_bufferingCounter

int MythPlayer::m_bufferingCounter {0}
protected

Definition at line 503 of file mythplayer.h.

Referenced by PrebufferEnoughFrames(), and MythPlayerUI::StartPlaying().

◆ m_disablePassthrough

bool MythPlayer::m_disablePassthrough {false}
private

Definition at line 508 of file mythplayer.h.

Referenced by SetDecoder(), SetDisablePassThrough(), and syncWithAudioStretch().


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