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 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 (int 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 (int total, int frames)
 
void SetDuration (int 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
 
int 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 (uint wait_in_msec=0, 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)
 
const VideoFrameTypesDirectRenderFormats (void)
 Return a list of frame types that can be rendered directly. More...
 
MythVideoFrameGetNextVideoFrame (void)
 Removes a frame from the available queue for decoding onto. More...
 
void DeLimboFrame (MythVideoFrame *frame)
 
virtual void ReleaseNextVideoFrame (MythVideoFrame *buffer, int64_t 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 (int64_t &timecode)
 
virtual uint GetCaptionMode () const
 
virtual CC708ReaderGetCC708Reader (uint=0)
 
virtual CC608ReaderGetCC608Reader (uint=0)
 
virtual SubtitleReaderGetSubReader (uint=0)
 
virtual TeletextReaderGetTeletextReader (uint=0)
 
void EnableSubtitles (bool enable)
 
void EnableForcedSubtitles (bool enable)
 
bool ForcedSubtitlesFavored (void) const
 
bool GetAllowForcedSubtitles (void) const
 
void CheckTVChain ()
 
void FileChangedCallback ()
 
virtual int GetNumChapters (void)
 
virtual int GetCurrentChapter (void)
 
virtual void GetChapterTimes (QList< long long > &times)
 
virtual int GetNumTitles (void) const
 
virtual int GetCurrentTitle (void) const
 
virtual int 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 GoToMenu (const QString &)
 
virtual void GoToDVDProgram (bool direction)
 
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
 

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...
 
uint64_t TranslatePositionFrameToMs (uint64_t position, bool use_cutlist) const
 
uint64_t TranslatePositionMsToFrame (uint64_t 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 (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)
 
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 bool DecoderGetFrameFFREW (void)
 
virtual bool DecoderGetFrameREW (void)
 
bool DecoderGetFrame (DecodeType decodetype, bool unsafe=false)
 
bool DoGetFrame (DecodeType DecodeType)
 Get one frame from the decoder. More...
 
bool UpdateFFRewSkip (void)
 
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...
 
void ClearBeforeSeek (uint64_t Frames)
 Discard video frames prior to seeking. More...
 
virtual bool DoJumpChapter (int chapter)
 
virtual int64_t GetChapter (int chapter)
 
void WrapTimecode (int64_t &timecode, TCTypes tc_type)
 
void SetFrameInterval (FrameScanType scan, double frame_period)
 

Protected Attributes

DecoderBasem_decoder {nullptr}
 
QMutex m_decoderChangeLock {QMutex::Recursive}
 
MythVideoOutputm_videoOutput {nullptr}
 
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_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_clearSavedPosition {1}
 
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}
 
long long m_totalLength {0}
 
int64_t m_totalDuration {0}
 
long long m_rewindTime {0}
 
int64_t m_latestVideoTimecode {-1}
 
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_enableCaptions {false}
 
bool m_disableCaptions {false}
 
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
 
QMutex m_decoderLock {QMutex::Recursive}
 Lock for next_play_speed and next_normal_speed. More...
 
float m_nextPlaySpeed {1.0F}
 
float m_playSpeed {1.0F}
 
int m_frameInterval {static_cast<int>((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}
 
bool m_fileChanged {false}
 
bool m_nextNormalSpeed {true}
 
bool m_normalSpeed {true}
 
tctype_arr m_tcWrap {}
 
int64_t m_savedAudioTimecodeOffset {0}
 
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 82 of file mythplayer.h.

Constructor & Destructor Documentation

◆ MythPlayer()

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

Definition at line 85 of file mythplayer.cpp.

◆ ~MythPlayer()

MythPlayer::~MythPlayer ( void  )
override

Definition at line 113 of file mythplayer.cpp.

Member Function Documentation

◆ CheckCallbacks

void MythPlayer::CheckCallbacks ( )
signal

◆ SeekingSlow

void MythPlayer::SeekingSlow ( int  Count)
signal

◆ SeekingComplete

void MythPlayer::SeekingComplete ( )
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 300 of file mythplayer.cpp.

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

◆ InitFrameInterval()

void MythPlayer::InitFrameInterval ( )
virtual

Reimplemented in MythPlayerUI.

Definition at line 696 of file mythplayer.cpp.

Referenced by MythPlayerUI::InitFrameInterval().

◆ SetLength()

void MythPlayer::SetLength ( int  len)
inline

Definition at line 115 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 126 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 ( int  total,
int  frames 
)

◆ SetDuration()

void MythPlayer::SetDuration ( int  duration)

Definition at line 393 of file mythplayer.cpp.

Referenced by AvFormatDecoder::OpenFile().

◆ SetFrameRate()

void MythPlayer::SetFrameRate ( double  fps)

Definition at line 380 of file mythplayer.cpp.

Referenced by AvFormatDecoder::ProcessVideoFrame().

◆ GetVideoBufferSize()

QSize MythPlayer::GetVideoBufferSize ( void  ) const
inline

Definition at line 129 of file mythplayer.h.

Referenced by PGMConverter::MythPlayerInited(), and VideoOutputD3D::ShowPIP().

◆ 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 133 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 571 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 137 of file mythplayer.h.

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

◆ GetAudio()

AudioPlayer* MythPlayer::GetAudio ( void  )
inline

Definition at line 138 of file mythplayer.h.

◆ GetNextPlaySpeed()

float MythPlayer::GetNextPlaySpeed ( void  ) const
inline

◆ GetLength()

int MythPlayer::GetLength ( void  ) const
inline

Definition at line 140 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 1961 of file mythplayer.cpp.

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

◆ GetEncodingType()

QString MythPlayer::GetEncodingType ( void  ) const

Definition at line 1716 of file mythplayer.cpp.

Referenced by MythPlayerUI::GetCodecDescription().

◆ GetXDS()

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

Definition at line 1730 of file mythplayer.cpp.

Referenced by TV::ChannelEditXDSFill().

◆ IsPaused()

bool MythPlayer::IsPaused ( void  ) const
inline

◆ GetRawAudioState()

bool MythPlayer::GetRawAudioState ( void  ) const

Definition at line 1723 of file mythplayer.cpp.

◆ GetLimitKeyRepeat()

bool MythPlayer::GetLimitKeyRepeat ( void  ) const
inline

Definition at line 152 of file mythplayer.h.

Referenced by TV::DoSeek().

◆ GetEof()

EofState MythPlayer::GetEof ( void  ) const

◆ IsErrored()

bool MythPlayer::IsErrored ( void  ) const

◆ IsPlaying()

bool MythPlayer::IsPlaying ( uint  wait_in_msec = 0,
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 1502 of file mythplayer.cpp.

Referenced by MythPlayerUI::SwitchToProgram().

◆ IsNearEnd()

bool MythPlayer::IsNearEnd ( void  )

Returns true iff near end of recording.

Definition at line 1513 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 1711 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 166 of file mythplayer.h.

Referenced by TV::DoSwitchTitle().

◆ NextTitle()

virtual bool MythPlayer::NextTitle ( void  )
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 167 of file mythplayer.h.

◆ PrevTitle()

virtual bool MythPlayer::PrevTitle ( void  )
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 168 of file mythplayer.h.

◆ SwitchAngle()

virtual bool MythPlayer::SwitchAngle ( int  )
inlinevirtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 171 of file mythplayer.h.

Referenced by TV::DoSwitchAngle().

◆ NextAngle()

virtual bool MythPlayer::NextAngle ( void  )
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 172 of file mythplayer.h.

◆ PrevAngle()

virtual bool MythPlayer::PrevAngle ( void  )
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 173 of file mythplayer.h.

◆ DirectRenderFormats()

const VideoFrameTypes * MythPlayer::DirectRenderFormats ( void  )

Return a list of frame types that can be rendered directly.

Definition at line 579 of file mythplayer.cpp.

Referenced by DecoderBase::GetBestVideoFormat(), and MythMMALContext::GetBuffer().

◆ 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 595 of file mythplayer.cpp.

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

◆ DeLimboFrame()

void MythPlayer::DeLimboFrame ( MythVideoFrame frame)

Definition at line 664 of file mythplayer.cpp.

Referenced by AvFormatDecoder::GenerateDummyVideoFrames().

◆ ReleaseNextVideoFrame()

void MythPlayer::ReleaseNextVideoFrame ( MythVideoFrame buffer,
int64_t  timecode,
bool  wrap = true 
)
virtual

Places frame on the queue of frames ready for display.

Reimplemented in MythDVDPlayer.

Definition at line 605 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 644 of file mythplayer.cpp.

Referenced by DecoderEnd(), MythNVDECContext::InitFramesContext(), MythVTBContext::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 650 of file mythplayer.cpp.

Referenced by MythPlayerUI::EventLoop().

◆ SetDisablePassThrough()

void MythPlayer::SetDisablePassThrough ( bool  disabled)

Definition at line 2005 of file mythplayer.cpp.

Referenced by syncWithAudioStretch().

◆ ForceSetupAudioStream()

void MythPlayer::ForceSetupAudioStream ( void  )

Definition at line 2011 of file mythplayer.cpp.

Referenced by MythPlayerAudioUI::EnableUpmix().

◆ PrepareAudioSample()

bool MythPlayer::PrepareAudioSample ( int64_t &  timecode)
virtual

Reimplemented in MythDVDPlayer.

Definition at line 1281 of file mythplayer.cpp.

Referenced by AudioPlayer::AddAudioData().

◆ GetCaptionMode()

virtual uint MythPlayer::GetCaptionMode ( ) const
inlinevirtual

Reimplemented in MythPlayerCaptionsUI.

Definition at line 193 of file mythplayer.h.

Referenced by MythDVDDecoder::PostProcessTracks().

◆ GetCC708Reader()

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

Reimplemented in MythCCExtractorPlayer.

Definition at line 194 of file mythplayer.h.

Referenced by SubtitleScreen::Create().

◆ GetCC608Reader()

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

Reimplemented in MythCCExtractorPlayer.

Definition at line 195 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 197 of file mythplayer.h.

Referenced by TeletextScreen::Create().

◆ EnableSubtitles()

void MythPlayer::EnableSubtitles ( bool  enable)

◆ EnableForcedSubtitles()

void MythPlayer::EnableForcedSubtitles ( bool  enable)

Definition at line 678 of file mythplayer.cpp.

Referenced by AvFormatDecoder::ProcessSubtitlePacket().

◆ ForcedSubtitlesFavored()

bool MythPlayer::ForcedSubtitlesFavored ( void  ) const
inline

Definition at line 202 of file mythplayer.h.

Referenced by DecoderBase::AutoSelectTrack().

◆ GetAllowForcedSubtitles()

bool MythPlayer::GetAllowForcedSubtitles ( void  ) const
inline

◆ CheckTVChain()

void MythPlayer::CheckTVChain ( void  )

◆ FileChangedCallback()

void MythPlayer::FileChangedCallback ( void  )

Definition at line 932 of file mythplayer.cpp.

Referenced by DecoderBase::FileChanged().

◆ GetNumChapters()

int MythPlayer::GetNumChapters ( void  )
virtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 1823 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 1830 of file mythplayer.cpp.

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

◆ GetChapterTimes()

void MythPlayer::GetChapterTimes ( QList< long long > &  times)
virtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 1837 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 221 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 222 of file mythplayer.h.

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

◆ GetTitleDuration()

virtual int MythPlayer::GetTitleDuration ( int  ) const
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 223 of file mythplayer.h.

Referenced by TV::GetTitleDuration().

◆ GetTitleName()

virtual QString MythPlayer::GetTitleName ( int  ) const
inlinevirtual

Reimplemented in MythBDPlayer.

Definition at line 224 of file mythplayer.h.

Referenced by TV::GetTitleName().

◆ GetNumAngles()

virtual int MythPlayer::GetNumAngles ( void  ) const
inlinevirtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 227 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 228 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 229 of file mythplayer.h.

Referenced by TV::GetAngleName().

◆ GoToMenu()

virtual bool MythPlayer::GoToMenu ( const QString &  )
inlinevirtual

Reimplemented in MythDVDPlayer, and MythBDPlayer.

Definition at line 232 of file mythplayer.h.

Referenced by TV::ActivePostQHandleAction(), and TV::OSDDialogEvent().

◆ GoToDVDProgram()

virtual void MythPlayer::GoToDVDProgram ( bool  direction)
inlinevirtual

Reimplemented in MythDVDPlayer.

Definition at line 233 of file mythplayer.h.

Referenced by TV::DVDJumpBack(), and TV::DVDJumpForward().

◆ IsInStillFrame()

virtual bool MythPlayer::IsInStillFrame ( void  ) const
inlinevirtual

Reimplemented in MythDVDPlayer.

Definition at line 234 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 1909 of file mythplayer.cpp.

Referenced by DecoderBase::PosMapFromEnc().

◆ SaveTotalDuration()

void MythPlayer::SaveTotalDuration ( void  )

◆ ResetTotalDuration()

void MythPlayer::ResetTotalDuration ( void  )

Definition at line 1975 of file mythplayer.cpp.

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

◆ SaveTotalFrames()

void MythPlayer::SaveTotalFrames ( void  )

Definition at line 1983 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 1428 of file mythplayer.cpp.

Referenced by MythDVDPlayer::CalcMaxFFTime(), DecoderGetFrameFFREW(), 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 1409 of file mythplayer.cpp.

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

◆ TranslatePositionFrameToMs()

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

◆ TranslatePositionMsToFrame()

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

◆ TranslatePositionAbsToRel()

uint64_t MythPlayer::TranslatePositionAbsToRel ( uint64_t  position) const
inlineprotected

Definition at line 270 of file mythplayer.h.

Referenced by TV::SeekHandleAction().

◆ TranslatePositionRelToAbs()

uint64_t MythPlayer::TranslatePositionRelToAbs ( uint64_t  position) const
inlineprotected

Definition at line 273 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 282 of file mythplayer.h.

Referenced by TV::SetAutoCommercialSkip().

◆ SkipCommercials()

void MythPlayer::SkipCommercials ( int  direction)
inlineprotected

Definition at line 284 of file mythplayer.h.

Referenced by TV::DoSkipCommercials().

◆ SetCommBreakMap()

void MythPlayer::SetCommBreakMap ( frm_dir_map_t newMap)
protected

Definition at line 1737 of file mythplayer.cpp.

Referenced by TV::customEvent().

◆ GetAutoCommercialSkip()

CommSkipMode MythPlayer::GetAutoCommercialSkip ( void  )
inlineprotected

Definition at line 287 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 938 of file mythplayer.cpp.

Referenced by PlayerContext::StopPlaying().

◆ PauseDecoder()

bool MythPlayer::PauseDecoder ( void  )
protected

◆ UnpauseDecoder()

void MythPlayer::UnpauseDecoder ( void  )
protected

Definition at line 983 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 861 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 904 of file mythplayer.cpp.

Referenced by TV::DoJumpChapter().

◆ PrebufferEnoughFrames()

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

Reimplemented in MythDVDPlayer.

Definition at line 722 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 1092 of file mythplayer.cpp.

Referenced by MythDecoderThread::run().

◆ DecoderEnd()

void MythPlayer::DecoderEnd ( void  )
protectedvirtual

Definition at line 1028 of file mythplayer.cpp.

Referenced by StopPlaying().

◆ DecoderPauseCheck()

void MythPlayer::DecoderPauseCheck ( void  )
protectedvirtual

Reimplemented in MythDVDPlayer.

Definition at line 1049 of file mythplayer.cpp.

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

◆ AudioEnd()

void MythPlayer::AudioEnd ( void  )
protectedvirtual

Definition at line 954 of file mythplayer.cpp.

Referenced by StopPlaying().

◆ GetEditMode()

bool MythPlayer::GetEditMode ( void  ) const
inlineprotected

Definition at line 319 of file mythplayer.h.

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

◆ IsInDelete()

bool MythPlayer::IsInDelete ( uint64_t  frame)
protected

◆ 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 1948 of file mythplayer.cpp.

Referenced by TV::HandleStateChange().

◆ PauseVideo()

void MythPlayer::PauseVideo ( void  )
protected

Definition at line 222 of file mythplayer.cpp.

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

◆ UnpauseVideo()

void MythPlayer::UnpauseVideo ( void  )
protected

Definition at line 230 of file mythplayer.cpp.

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

◆ PauseBuffer()

void MythPlayer::PauseBuffer ( void  )
protected

Definition at line 138 of file mythplayer.cpp.

Referenced by Pause().

◆ UnpauseBuffer()

void MythPlayer::UnpauseBuffer ( void  )
protected

Definition at line 150 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 1891 of file mythplayer.cpp.

Referenced by MythDVDPlayer::CreateDecoder(), CreateDecoder(), MythBDPlayer::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 338 of file mythplayer.h.

◆ DecoderGetFrameFFREW()

bool MythPlayer::DecoderGetFrameFFREW ( void  )
protectedvirtual

Reimplemented in MythDVDPlayer.

Definition at line 1157 of file mythplayer.cpp.

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

◆ DecoderGetFrameREW()

bool MythPlayer::DecoderGetFrameREW ( void  )
protectedvirtual

Reimplemented in MythDVDPlayer.

Definition at line 1181 of file mythplayer.cpp.

Referenced by DecoderGetFrameFFREW(), and MythDVDPlayer::DecoderGetFrameREW().

◆ 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 here in MythPlayer so that we can 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 1252 of file mythplayer.cpp.

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

◆ UpdateFFRewSkip()

bool MythPlayer::UpdateFFRewSkip ( void  )
protected

Definition at line 1312 of file mythplayer.cpp.

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

◆ ChangeSpeed()

void MythPlayer::ChangeSpeed ( void  )
protectedvirtual

Reimplemented in MythDVDPlayer, and MythPlayerUI.

Definition at line 1351 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 1656 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().

◆ ClearBeforeSeek()

void MythPlayer::ClearBeforeSeek ( uint64_t  Frames)
protected

Discard video frames prior to seeking.

Note
This is only used for MediaCodec surface rendering where the decoder will stall waiting for buffers if we do not free those buffers first. This is currently only an issue for recordings and livetv as the decoder is not paused before seeking when using a position map.
m_watchingRecording does not appear to be accurate - so is currently ignored.

Definition at line 1687 of file mythplayer.cpp.

Referenced by DoFastForward(), and DoRewind().

◆ DoJumpChapter()

bool MythPlayer::DoJumpChapter ( int  chapter)
protectedvirtual

Reimplemented in MythDVDPlayer.

Definition at line 1843 of file mythplayer.cpp.

Referenced by MythPlayerUI::EventLoop().

◆ GetChapter()

int64_t MythPlayer::GetChapter ( int  chapter)
protectedvirtual

Reimplemented in MythBDPlayer.

Definition at line 1881 of file mythplayer.cpp.

Referenced by DoJumpChapter().

◆ WrapTimecode()

void MythPlayer::WrapTimecode ( int64_t &  timecode,
TCTypes  tc_type 
)
protected

◆ SetFrameInterval()

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

Definition at line 686 of file mythplayer.cpp.

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

◆ syncWithAudioStretch()

void MythPlayer::syncWithAudioStretch ( )
private

Definition at line 1991 of file mythplayer.cpp.

Referenced by ChangeSpeed(), and SetDecoder().

Friends And Related Function Documentation

◆ PlayerContext

friend class PlayerContext
friend

Definition at line 87 of file mythplayer.h.

◆ CC708Reader

friend class CC708Reader
friend

Definition at line 88 of file mythplayer.h.

Referenced by MythCCExtractorPlayer::GetCC708Reader().

◆ CC608Reader

friend class CC608Reader
friend

Definition at line 89 of file mythplayer.h.

Referenced by MythCCExtractorPlayer::GetCC608Reader().

◆ MythDecoderThread

friend class MythDecoderThread
friend

Definition at line 90 of file mythplayer.h.

Referenced by DecoderStart().

◆ VideoPerformanceTest

friend class VideoPerformanceTest
friend

Definition at line 91 of file mythplayer.h.

◆ TV

friend class TV
friend

Definition at line 93 of file mythplayer.h.

◆ Transcode

friend class Transcode
friend

Definition at line 94 of file mythplayer.h.

Member Data Documentation

◆ kNightModeBrightenssAdjustment

const int MythPlayer::kNightModeBrightenssAdjustment = 10
static

Definition at line 242 of file mythplayer.h.

◆ kNightModeContrastAdjustment

const int MythPlayer::kNightModeContrastAdjustment = 10
static

Definition at line 243 of file mythplayer.h.

◆ kInaccuracyNone

const double MythPlayer::kInaccuracyNone = 0
static

◆ kInaccuracyDefault

const double MythPlayer::kInaccuracyDefault = 0.1
static

Definition at line 245 of file mythplayer.h.

Referenced by MythPlayerUI::EventLoop().

◆ kInaccuracyEditor

const double MythPlayer::kInaccuracyEditor = 0.5
static

Definition at line 246 of file mythplayer.h.

Referenced by MythPlayerUI::HandleProgramEditorActions().

◆ kInaccuracyFull

const double MythPlayer::kInaccuracyFull = -1.0
static

Definition at line 247 of file mythplayer.h.

Referenced by ChangeSpeed(), DoFastForward(), DoRewind(), and MythPlayerUI::HandleArbSeek().

◆ m_decoder

DecoderBase* MythPlayer::m_decoder {nullptr}
protected

Definition at line 366 of file mythplayer.h.

Referenced by MythDVDPlayer::AutoDeint(), MythPlayerCaptionsUI::ChangeCaptionTrack(), MythDVDPlayer::ChangeSpeed(), MythPlayerCaptionsUI::ChangeTrack(), ClearBeforeSeek(), DecoderGetFrame(), DecoderGetFrameFFREW(), MythDVDPlayer::DecoderGetFrameFFREW(), DecoderGetFrameREW(), DecoderLoop(), MythPlayerCaptionsUI::DisableCaptions(), MythPlayerUI::DisplayNormalFrame(), DoGetFrame(), MythDVDPlayer::DoJumpChapter(), MythDVDPlayer::EnableCaptions(), MythPlayerCaptionsUI::EnableCaptions(), MythPlayerUI::EventLoop(), MythDVDPlayer::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

QMutex MythPlayer::m_decoderChangeLock {QMutex::Recursive}
mutableprotected

◆ m_videoOutput

MythVideoOutput* MythPlayer::m_videoOutput {nullptr}
protected

◆ m_playerCtx

PlayerContext* MythPlayer::m_playerCtx {nullptr}
protected

Definition at line 369 of file mythplayer.h.

Referenced by MythDVDPlayer::CalcMaxFFTime(), CalcMaxFFTime(), CalcRWTime(), MythPlayerUI::ChangeOSDDebug(), MythDVDPlayer::ChangeSpeed(), CheckTVChain(), MythDVDPlayer::CreateDecoder(), CreateDecoder(), MythBDPlayer::CreateDecoder(), MythDVDPlayer::DecoderGetFrameREW(), DecoderLoop(), MythDVDPlayer::DisableCaptions(), MythPlayerUI::DisableEdit(), MythDVDPlayer::DisplayDVDButton(), MythBDPlayer::DisplayMenu(), MythBDPlayer::DisplayPauseFrame(), MythDVDPlayer::DisplayPauseFrame(), DoFastForward(), MythDVDPlayer::DoJumpChapter(), DoRewind(), MythDVDPlayer::EnableCaptions(), MythPlayerUI::EnableEdit(), MythDVDPlayer::EventEnd(), MythPlayerUI::EventLoop(), MythPlayerUI::EventStart(), MythBDPlayer::EventStart(), MythDVDPlayer::EventStart(), MythPlayerUI::FileChanged(), FindFrame(), GetBookmark(), MythBDPlayer::GetBookmark(), MythDVDPlayer::GetBookmark(), MythBDPlayer::GetChapter(), MythBDPlayer::GetChapterTimes(), MythDVDPlayer::GetChapterTimes(), MythBDPlayer::GetCurrentAngle(), MythDVDPlayer::GetCurrentAngle(), MythBDPlayer::GetCurrentChapter(), MythDVDPlayer::GetCurrentChapter(), GetCurrentFrameCount(), MythBDPlayer::GetCurrentTitle(), MythBDPlayer::GetNumAngles(), MythDVDPlayer::GetNumAngles(), MythBDPlayer::GetNumChapters(), MythDVDPlayer::GetNumChapters(), MythBDPlayer::GetNumTitles(), MythPlayerUI::GetPlaybackData(), MythCommFlagPlayer::GetRawVideoFrame(), MythPreviewPlayer::GetScreenGrabAtFrame(), MythDVDPlayer::GetSecondsPlayed(), 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(), MythBDPlayer::SetBookmark(), MythPlayerUI::SetBookmark(), MythDVDPlayer::SetBookmark(), SetPlayingInfo(), MythPlayerCaptionsUI::SetStream(), MythDVDPlayer::SetTrack(), MythPlayerUI::SetWatched(), MythDVDPlayer::StillFrameCheck(), MythBDPlayer::SwitchAngle(), MythDVDPlayer::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 371 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 378 of file mythplayer.h.

Referenced by PauseDecoder().

◆ m_decoderThreadUnpause

QWaitCondition MythPlayer::m_decoderThreadUnpause
protected

Definition at line 379 of file mythplayer.h.

Referenced by UnpauseDecoder().

◆ m_decoderPauseLock

QMutex MythPlayer::m_decoderPauseLock
mutableprotected

Definition at line 380 of file mythplayer.h.

Referenced by PauseDecoder(), and UnpauseDecoder().

◆ m_decoderSeekLock

QMutex MythPlayer::m_decoderSeekLock
mutableprotected

Definition at line 381 of file mythplayer.h.

Referenced by DecoderLoop(), and WaitForSeek().

◆ m_bufferPauseLock

QMutex MythPlayer::m_bufferPauseLock
mutableprotected

Definition at line 382 of file mythplayer.h.

Referenced by PauseBuffer(), and UnpauseBuffer().

◆ m_videoPauseLock

QMutex MythPlayer::m_videoPauseLock
mutableprotected

Definition at line 383 of file mythplayer.h.

Referenced by PauseVideo(), and UnpauseVideo().

◆ m_pauseLock

QMutex MythPlayer::m_pauseLock
mutableprotected

Definition at line 384 of file mythplayer.h.

Referenced by Pause(), and Play().

◆ m_decoderSeek

int64_t MythPlayer::m_decoderSeek {-1}
protected

Definition at line 385 of file mythplayer.h.

Referenced by DecoderLoop(), and WaitForSeek().

◆ m_totalDecoderPause

bool MythPlayer::m_totalDecoderPause {false}
protected

Definition at line 386 of file mythplayer.h.

Referenced by DecoderLoop(), and SetDecoder().

◆ m_decoderPaused

bool MythPlayer::m_decoderPaused {false}
protected

Definition at line 387 of file mythplayer.h.

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

◆ m_inJumpToProgramPause

bool MythPlayer::m_inJumpToProgramPause {false}
protected

Definition at line 388 of file mythplayer.h.

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

◆ m_pauseDecoder

bool MythPlayer::m_pauseDecoder {false}
protected

Definition at line 389 of file mythplayer.h.

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

◆ m_unpauseDecoder

bool MythPlayer::m_unpauseDecoder {false}
protected

Definition at line 390 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_needNewPauseFrame

bool MythPlayer::m_needNewPauseFrame {false}
protected

◆ m_bufferPaused

bool MythPlayer::m_bufferPaused {false}
protected

Definition at line 394 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 397 of file mythplayer.h.

Referenced by IsPlaying(), and SetPlaying().

◆ m_playingWaitCond

QWaitCondition MythPlayer::m_playingWaitCond
mutableprotected

Definition at line 399 of file mythplayer.h.

Referenced by IsPlaying(), and SetPlaying().

◆ m_vidExitLock

QMutex MythPlayer::m_vidExitLock
mutableprotected

Definition at line 400 of file mythplayer.h.

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

◆ m_playingLock

QMutex MythPlayer::m_playingLock
mutableprotected

Definition at line 401 of file mythplayer.h.

Referenced by IsPlaying(), and SetPlaying().

◆ m_errorLock

QMutex MythPlayer::m_errorLock
mutableprotected

Definition at line 402 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 403 of file mythplayer.h.

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

◆ m_errorType

int MythPlayer::m_errorType {kError_None}
protected

Definition at line 404 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 407 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 409 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_clearSavedPosition

int MythPlayer::m_clearSavedPosition {1}
protected

Definition at line 416 of file mythplayer.h.

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

◆ m_endExitPrompt

int MythPlayer::m_endExitPrompt
protected

Definition at line 417 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 422 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 426 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

long long MythPlayer::m_totalLength {0}
protected

◆ m_totalDuration

int64_t MythPlayer::m_totalDuration {0}
protected

◆ m_rewindTime

long long MythPlayer::m_rewindTime {0}
protected

◆ m_latestVideoTimecode

int64_t MythPlayer::m_latestVideoTimecode {-1}
protected

Definition at line 432 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 440 of file mythplayer.h.

Referenced by ClearBeforeSeek(), 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 443 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 445 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 448 of file mythplayer.h.

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

◆ m_buffering

bool MythPlayer::m_buffering {false}
protected

Definition at line 451 of file mythplayer.h.

Referenced by SetBuffering().

◆ m_bufferingStart

QTime MythPlayer::m_bufferingStart
protected

Definition at line 452 of file mythplayer.h.

Referenced by PrebufferEnoughFrames(), and SetBuffering().

◆ m_bufferingLastMsg

QTime MythPlayer::m_bufferingLastMsg
protected

Definition at line 453 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 457 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 458 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 462 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 465 of file mythplayer.h.

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

◆ m_enableCaptions

bool MythPlayer::m_enableCaptions {false}
protected

◆ m_disableCaptions

bool MythPlayer::m_disableCaptions {false}
protected

◆ 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 474 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

QMutex MythPlayer::m_decoderLock {QMutex::Recursive}
protected

Lock for next_play_speed and next_normal_speed.

Definition at line 487 of file mythplayer.h.

◆ m_nextPlaySpeed

float MythPlayer::m_nextPlaySpeed {1.0F}
protected

◆ m_playSpeed

float MythPlayer::m_playSpeed {1.0F}
protected

◆ m_frameInterval

int MythPlayer::m_frameInterval {static_cast<int>((1000000.0F / 30))}
protected

◆ m_fpsMultiplier

int MythPlayer::m_fpsMultiplier {1}
protected

used to detect changes

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

Definition at line 493 of file mythplayer.h.

Referenced by DecoderGetFrameFFREW(), DecoderGetFrameREW(), and UpdateFFRewSkip().

◆ m_fileChanged

bool MythPlayer::m_fileChanged {false}
protected

◆ m_nextNormalSpeed

bool MythPlayer::m_nextNormalSpeed {true}
protected

Definition at line 495 of file mythplayer.h.

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

◆ m_normalSpeed

bool MythPlayer::m_normalSpeed {true}
protected

Definition at line 496 of file mythplayer.h.

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

◆ m_tcWrap

tctype_arr MythPlayer::m_tcWrap {}
protected

◆ m_savedAudioTimecodeOffset

int64_t MythPlayer::m_savedAudioTimecodeOffset {0}
protected

Definition at line 500 of file mythplayer.h.

Referenced by MythPlayerUI::DisableEdit(), and MythPlayerUI::EnableEdit().

◆ m_isDummy

bool MythPlayer::m_isDummy {false}
protected

◆ m_bufferingCounter

int MythPlayer::m_bufferingCounter {0}
protected

Definition at line 506 of file mythplayer.h.

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

◆ m_disablePassthrough

bool MythPlayer::m_disablePassthrough {false}
private

Definition at line 511 of file mythplayer.h.

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


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