MythTV  master
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
PlayerContext Class Reference

#include <playercontext.h>

Collaboration diagram for PlayerContext:
Collaboration graph
[legend]

Public Member Functions

 PlayerContext (const QString &inUseID=QString("Unknown"))
 
 ~PlayerContext ()
 
bool CreatePlayer (TV *tv, QWidget *widget, TVState desiredState, bool embed, const QRect &embedBounds=QRect(), bool muted=false)
 
void TeardownPlayer (void)
 
bool StartPlaying (int maxWait=-1)
 Starts player, must be called after StartRecorder(). More...
 
void StopPlaying (void)
 
void UpdateTVChain (const QStringList &data=QStringList())
 
bool ReloadTVChain (void)
 
void CreatePIPWindow (const QRect &, int pos=-1, QWidget *widget=nullptr)
 
void ResizePIPWindow (const QRect &)
 Resize PIP Window. More...
 
bool StartPIPPlayer (TV *tv, TVState desiredState)
 
void PIPTeardown (void)
 stop player but pause the ringbuffer. More...
 
void SetNullVideo (bool setting)
 
bool StartEmbedding (const QRect &)
 
void StopEmbedding (void)
 
void PushPreviousChannel (void)
 most recently selected channel to the previous channel list More...
 
QString PopPreviousChannel (void)
 
void ChangeState (TVState newState)
 Puts a state change on the nextState queue. More...
 
void ForceNextStateNone (void)
 Removes any pending state changes, and puts kState_None on the queue. More...
 
TVState DequeueNextState (void)
 
void ResizePIPWindow (void)
 
bool HandlePlayerSpeedChangeFFRew (void)
 
bool HandlePlayerSpeedChangeEOF (void)
 
void LockState (void) const
 
void UnlockState (void) const
 
void LockPlayingInfo (const char *file, int line) const
 
void UnlockPlayingInfo (const char *file, int line) const
 
void LockDeletePlayer (const char *file, int line) const
 prevent MythPlayer from being deleted used to ensure player can only be deleted after osd in TV() is unlocked. More...
 
void UnlockDeletePlayer (const char *file, int line) const
 allow player to be deleted. More...
 
void LockOSD (void) const
 
void UnlockOSD (void) const
 
void SetInitialTVState (bool islivetv)
 determine initial tv state and playgroup for the recording More...
 
void SetPlayer (MythPlayer *newplayer)
 
void SetRecorder (RemoteEncoder *rec)
 
void SetTVChain (LiveTVChain *chain)
 
void SetRingBuffer (RingBuffer *buf)
 
void SetPlayingInfo (const ProgramInfo *info)
 assign programinfo to the context More...
 
void SetPlayGroup (const QString &group)
 
void SetPseudoLiveTV (const ProgramInfo *pi, PseudoState new_state)
 
void SetPIPLocation (int loc)
 
void SetPIPState (PIPState change)
 
void SetPlayerChangingBuffers (bool val)
 
void SetNoHardwareDecoders (void)
 
QRect GetStandAlonePIPRect (void)
 Get PIP more accurate display size for standalone PIP by factoring the aspect ratio of the video. More...
 
PIPState GetPIPState (void) const
 
QString GetPreviousChannel (void) const
 
bool CalcPlayerSliderPosition (osdInfo &info, bool paddedFields=false) const
 
uint GetCardID (void) const
 
QString GetFilters (const QString &baseFilters) const
 
QString GetPlayMessage (void) const
 
TVState GetState (void) const
 
bool GetPlayingInfoMap (InfoMap &infoMap) const
 
bool IsPIPSupported (void) const
 Check if PIP is supported for current video renderer running. More...
 
bool IsPBPSupported (void) const
 Check if PBP is supported for current video renderer running. More...
 
bool IsPIP (void) const
 
bool IsPBP (void) const
 
bool IsPrimaryPBP (void) const
 
bool IsAudioNeeded (void) const
 
bool IsNullVideoDesired (void) const
 
bool IsPlayerChangingBuffers (void) const
 
bool IsEmbedding (void) const
 
bool HasPlayer (void) const
 
bool IsPlayerErrored (void) const
 
bool IsPlayerRecoverable (void) const
 
bool IsPlayerDecoderErrored (void) const
 
bool IsPlayerPlaying (void) const
 
bool IsRecorderErrored (void) const
 
bool InStateChange (void) const
 
bool IsErrored (void) const
 This is set if the player encountered some irrecoverable error. More...
 
bool IsSameProgram (const ProgramInfo &p) const
 
bool IsValidLiveTV (void) const
 

Public Attributes

QString m_recUsage
 
MythPlayerm_player {nullptr}
 
volatile bool m_playerUnsafe {false}
 
RemoteEncoderm_recorder {nullptr}
 
LiveTVChainm_tvchain {nullptr}
 
RingBufferm_buffer {nullptr}
 
ProgramInfom_playingInfo {nullptr}
 Currently playing info. More...
 
long long m_playingLen {0}
 Initial CalculateLength() More...
 
bool m_nohardwaredecoders {false}
 
int m_lastCardid {-1}
 CardID of current/last recorder. More...
 
int m_ffRewState {0}
 0 == normal, +1 == fast forward, -1 == rewind More...
 
int m_ffRewIndex {0}
 Index into m_ffRewSpeeds for FF and Rewind speeds. More...
 
int m_ffRewSpeed {0}
 Caches value of m_ffRewSpeeds[m_ffRewIndex]. More...
 
TVState m_playingState {kState_None}
 
bool m_errored {false}
 
StringDeque m_prevChan
 Previous channels. More...
 
ProgramInfom_pseudoLiveTVRec {nullptr}
 
PseudoState m_pseudoLiveTVState {kPseudoNormalLiveTV}
 
int m_fftime {0}
 
int m_rewtime {0}
 
int m_jumptime {0}
 
float m_tsNormal {1.0F}
 Time stretch speed, 1.0F for normal playback. More...
 
float m_tsAlt {1.5F}
 
QMutex m_playingInfoLock {QMutex::Recursive}
 
QMutex m_deletePlayerLock {QMutex::Recursive}
 
QMutex m_stateLock {QMutex::Recursive}
 
QStringList m_lastSignalMsg
 
MythTimer m_lastSignalMsgTime
 
InfoMap m_lastSignalUIInfo
 
MythTimer m_lastSignalUIInfoTime
 
MythDeque< TVStatem_nextState
 
PIPState m_pipState {kPIPOff}
 
QRect m_pipRect {0,0,0,0}
 
QWidget * m_parentWidget {nullptr}
 
int m_pipLocation {0}
 Position of PIP on TV screen. More...
 
bool m_useNullVideo {false}
 True iff software scaled PIP should be used. More...
 

Static Public Attributes

static const uint kSMExitTimeout = 2000
 Timeout after last Signal Monitor message for ignoring OSD when exiting. More...
 
static const uint kMaxChannelHistory = 30
 

Detailed Description

Definition at line 48 of file playercontext.h.

Constructor & Destructor Documentation

◆ PlayerContext()

PlayerContext::PlayerContext ( const QString &  inUseID = QString("Unknown"))
explicit

Definition at line 29 of file playercontext.cpp.

◆ ~PlayerContext()

PlayerContext::~PlayerContext ( )

Definition at line 36 of file playercontext.cpp.

Member Function Documentation

◆ CreatePlayer()

bool PlayerContext::CreatePlayer ( TV tv,
QWidget *  widget,
TVState  desiredState,
bool  embed,
const QRect &  embedBounds = QRect(),
bool  muted = false 
)

◆ TeardownPlayer()

void PlayerContext::TeardownPlayer ( void  )

Definition at line 42 of file playercontext.cpp.

Referenced by TV::TeardownPlayer(), and ~PlayerContext().

◆ StartPlaying()

bool PlayerContext::StartPlaying ( int  maxWait = -1)

Starts player, must be called after StartRecorder().

Parameters
maxWaitHow long to wait for MythPlayer to start playing.
Returns
true when successful, false otherwise.

Definition at line 436 of file playercontext.cpp.

Referenced by CreatePlayer().

◆ StopPlaying()

void PlayerContext::StopPlaying ( void  )

◆ UpdateTVChain()

void PlayerContext::UpdateTVChain ( const QStringList &  data = QStringList())

Definition at line 476 of file playercontext.cpp.

Referenced by TV::customEvent().

◆ ReloadTVChain()

bool PlayerContext::ReloadTVChain ( void  )

◆ CreatePIPWindow()

void PlayerContext::CreatePIPWindow ( const QRect &  rect,
int  pos = -1,
QWidget *  widget = nullptr 
)

Definition at line 134 of file playercontext.cpp.

◆ ResizePIPWindow() [1/2]

void PlayerContext::ResizePIPWindow ( const QRect &  rect)

Resize PIP Window.

Definition at line 233 of file playercontext.cpp.

Referenced by TV::ResizePIPWindow(), and TV::StartEmbedding().

◆ StartPIPPlayer()

bool PlayerContext::StartPIPPlayer ( TV tv,
TVState  desiredState 
)

Definition at line 183 of file playercontext.cpp.

Referenced by TV::StartPlayer().

◆ PIPTeardown()

void PlayerContext::PIPTeardown ( void  )

stop player but pause the ringbuffer.

used in PIP/PBP swap or switching from PIP <-> PBP or enabling PBP

Definition at line 211 of file playercontext.cpp.

Referenced by TV::CreatePBP(), TV::PBPRestartMainPlayer(), and TV::TeardownAllPlayers().

◆ SetNullVideo()

void PlayerContext::SetNullVideo ( bool  setting)
inline

Definition at line 69 of file playercontext.h.

Referenced by TV::CreatePIP().

◆ StartEmbedding()

bool PlayerContext::StartEmbedding ( const QRect &  embedRect)

Definition at line 252 of file playercontext.cpp.

Referenced by TV::StartEmbedding().

◆ StopEmbedding()

void PlayerContext::StopEmbedding ( void  )

Definition at line 275 of file playercontext.cpp.

Referenced by TV::StopEmbedding().

◆ PushPreviousChannel()

void PlayerContext::PushPreviousChannel ( void  )

most recently selected channel to the previous channel list

Definition at line 505 of file playercontext.cpp.

Referenced by TV::ChangeChannel(), PopPreviousChannel(), TV::SwitchInputs(), and TV::UnpauseLiveTV().

◆ PopPreviousChannel()

QString PlayerContext::PopPreviousChannel ( void  )

Definition at line 524 of file playercontext.cpp.

Referenced by TV::PopPreviousChannel().

◆ ChangeState()

void PlayerContext::ChangeState ( TVState  newState)

Puts a state change on the nextState queue.

Definition at line 646 of file playercontext.cpp.

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

◆ ForceNextStateNone()

void PlayerContext::ForceNextStateNone ( void  )

Removes any pending state changes, and puts kState_None on the queue.

Definition at line 661 of file playercontext.cpp.

Referenced by TV::ForceNextStateNone().

◆ DequeueNextState()

TVState PlayerContext::DequeueNextState ( void  )

Definition at line 652 of file playercontext.cpp.

Referenced by TV::HandleStateChange().

◆ ResizePIPWindow() [2/2]

void PlayerContext::ResizePIPWindow ( void  )

◆ HandlePlayerSpeedChangeFFRew()

bool PlayerContext::HandlePlayerSpeedChangeFFRew ( void  )

Definition at line 313 of file playercontext.cpp.

Referenced by TV::HandleSpeedChangeTimerEvent().

◆ HandlePlayerSpeedChangeEOF()

bool PlayerContext::HandlePlayerSpeedChangeEOF ( void  )

Definition at line 326 of file playercontext.cpp.

Referenced by TV::HandleSpeedChangeTimerEvent().

◆ LockState()

void PlayerContext::LockState ( void  ) const

Definition at line 614 of file playercontext.cpp.

Referenced by TV::HandleStateChange().

◆ UnlockState()

void PlayerContext::UnlockState ( void  ) const

Definition at line 619 of file playercontext.cpp.

Referenced by TV::HandleStateChange().

◆ LockPlayingInfo()

void PlayerContext::LockPlayingInfo ( const char *  file,
int  line 
) const

Definition at line 558 of file playercontext.cpp.

Referenced by TVBrowseHelper::BrowseStart(), TV::ChangeChannel(), TV::CommitQueuedInput(), TV::customEvent(), MythPlayer::DisableEdit(), TV::DoEditSchedule(), TV::DoQueueTranscode(), MythPlayer::EnableEdit(), MythPlayer::EventLoop(), MythBDPlayer::EventStart(), MythDVDPlayer::EventStart(), MythPlayer::EventStart(), MythPlayer::FileChanged(), TV::FillOSDMenuJumpRec(), MythDVDPlayer::GetBookmark(), MythBDPlayer::GetBookmark(), MythPlayer::GetBookmark(), GetFilters(), GetPlayingInfoMap(), MythPlayer::GetRawVideoFrame(), TV::GetRecordingGroup(), TV::GetStatus(), TV::HandleOSDAlreadyEditing(), TV::HandleStateChange(), TV::IsBookmarkAllowed(), TV::IsDeleteAllowed(), DeleteMap::IsFileEditing(), MythPlayer::IsNearEnd(), IsSameProgram(), DeleteMap::IsSaved(), TV::ITVRestart(), DeleteMap::LoadAutoSaveMap(), CommBreakMap::LoadMap(), DeleteMap::LoadMap(), MythPlayer::OpenDummy(), MythPlayer::OpenFile(), TV::PlaybackMenuInit(), TV::ProcessNetworkControlCommand(), TV::QuickRecord(), MythCCExtractorPlayer::run(), DeleteMap::SaveMap(), MythBDPlayer::SetBookmark(), MythDVDPlayer::SetBookmark(), MythPlayer::SetBookmark(), DeleteMap::SetFileEditing(), SetInitialTVState(), MythPlayer::SetPlayingInfo(), MythPlayer::SetWatched(), TV::ShowLCDChannelInfo(), TV::ShowOSDPromptDeleteRecording(), TV::ShowOSDStopWatchingRecording(), TV::StartProgramEditMode(), TV::SwitchInputs(), TV::ToggleAutoExpire(), MythPlayer::TranscodeGetNextFrame(), and DeleteMap::UpdateOSD().

◆ UnlockPlayingInfo()

void PlayerContext::UnlockPlayingInfo ( const char *  file,
int  line 
) const

Definition at line 570 of file playercontext.cpp.

Referenced by TVBrowseHelper::BrowseStart(), TV::ChangeChannel(), TV::CommitQueuedInput(), TV::customEvent(), MythPlayer::DisableEdit(), TV::DoEditSchedule(), TV::DoQueueTranscode(), MythPlayer::EnableEdit(), MythPlayer::EventLoop(), MythBDPlayer::EventStart(), MythDVDPlayer::EventStart(), MythPlayer::EventStart(), MythPlayer::FileChanged(), TV::FillOSDMenuJumpRec(), MythDVDPlayer::GetBookmark(), MythBDPlayer::GetBookmark(), MythPlayer::GetBookmark(), GetFilters(), GetPlayingInfoMap(), MythPlayer::GetRawVideoFrame(), TV::GetRecordingGroup(), TV::GetStatus(), TV::HandleOSDAlreadyEditing(), TV::HandleStateChange(), TV::IsBookmarkAllowed(), TV::IsDeleteAllowed(), DeleteMap::IsFileEditing(), MythPlayer::IsNearEnd(), IsSameProgram(), DeleteMap::IsSaved(), TV::ITVRestart(), DeleteMap::LoadAutoSaveMap(), CommBreakMap::LoadMap(), DeleteMap::LoadMap(), MythPlayer::OpenDummy(), MythPlayer::OpenFile(), TV::PlaybackMenuInit(), TV::ProcessNetworkControlCommand(), TV::QuickRecord(), MythCCExtractorPlayer::run(), DeleteMap::SaveMap(), MythBDPlayer::SetBookmark(), MythDVDPlayer::SetBookmark(), MythPlayer::SetBookmark(), DeleteMap::SetFileEditing(), SetInitialTVState(), MythPlayer::SetPlayingInfo(), MythPlayer::SetWatched(), TV::ShowLCDChannelInfo(), TV::ShowOSDPromptDeleteRecording(), TV::ShowOSDStopWatchingRecording(), TV::StartProgramEditMode(), TV::SwitchInputs(), TV::ToggleAutoExpire(), MythPlayer::TranscodeGetNextFrame(), and DeleteMap::UpdateOSD().

◆ LockDeletePlayer()

void PlayerContext::LockDeletePlayer ( const char *  file,
int  line 
) const

prevent MythPlayer from being deleted used to ensure player can only be deleted after osd in TV() is unlocked.

Definition at line 587 of file playercontext.cpp.

Referenced by TV::ActiveHandleAction(), TV::ActivePostQHandleAction(), TV::ChangeAudioSync(), TV::ChangeChannel(), TV::ChangeSpeed(), TV::ChangeSubtitleDelay(), TV::ChangeSubtitleZoom(), TV::ChangeTimeStretch(), TV::ChangeVolume(), TV::ChannelEditXDSFill(), TV::ContextIsPaused(), TV::CreatePBP(), TV::customEvent(), TV::DoArbSeek(), TV::DoChangePictureAttribute(), TV::DoEditSchedule(), TV::DoJumpChapter(), TV::DoPlay(), TV::DoPlayerSeek(), TV::DoPlayerSeekToFrame(), TV::DoSeek(), TV::DoSeekAbsolute(), TV::DoSkipCommercials(), TV::DoSwitchAngle(), TV::DoSwitchTitle(), TV::DoToggleNightMode(), TV::DoTogglePause(), TV::DoTogglePauseStart(), TV::DoTogglePictureAttribute(), TV::DoToggleStudioLevels(), TV::DrawUnusedRects(), TV::DVDJumpBack(), TV::DVDJumpForward(), TV::EnableUpmix(), TV::EnableVisualisation(), TV::event(), TV::GetAngleName(), TV::GetChapterTimes(), TV::GetCurrentAngle(), TV::GetCurrentChapter(), TV::GetCurrentTitle(), TV::GetNumAngles(), TV::GetNumChapters(), TV::GetNumTitles(), TV::GetOSDL(), TV::GetStatus(), TV::GetTitleDuration(), TV::GetTitleName(), TV::Handle3D(), TV::HandleDeinterlacer(), TV::HandleEndOfRecordingExitPromptTimerEvent(), TV::HandleIsNearEndWhenEmbeddingTimerEvent(), TV::HandleOSDAlreadyEditing(), TV::HandleOSDClosed(), TV::HandleOSDVideoExit(), TV::HandleSaveLastPlayPosEvent(), TV::HandleTrackAction(), IsEmbedding(), TV::IsPaused(), TV::ITVRestart(), TV::ManualZoomHandleAction(), TV::MenuItemDisplayCutlist(), TV::MenuItemDisplayPlayback(), TV::NormalSpeed(), TV::OSDDialogEvent(), TV::PauseAudioUntilBuffered(), TV::PauseLiveTV(), TV::PBPRestartMainPlayer(), TV::PIPAddPlayer(), TV::PlaybackLoop(), TV::PlaybackMenuInit(), TV::PrepareToExitPlayer(), TV::ProcessKeypressOrGesture(), TV::ProcessNetworkControlCommand(), TV::PxPToggleType(), ResizePIPWindow(), TV::RestartAllPlayers(), TV::RestartMainPlayer(), TV::SaveBottomLine(), TV::SeekHandleAction(), TV::SetActive(), TV::SetAutoCommercialSkip(), TV::SetBookmark(), TV::SetFFRew(), StartEmbedding(), TV::StartProgramEditMode(), TV::StartTV(), StopEmbedding(), TV::StopFFRew(), TV::StopStuff(), TV::SwitchInputs(), TV::TeardownAllPlayers(), TV::ToggleAdjustFill(), TV::ToggleAspectOverride(), TV::ToggleMoveBottomLine(), TV::ToggleMute(), TV::UnpauseLiveTV(), and TV::UpdateNavDialog().

◆ UnlockDeletePlayer()

void PlayerContext::UnlockDeletePlayer ( const char *  file,
int  line 
) const

allow player to be deleted.

Definition at line 602 of file playercontext.cpp.

Referenced by TV::ActiveHandleAction(), TV::ActivePostQHandleAction(), TV::ChangeAudioSync(), TV::ChangeChannel(), TV::ChangeSpeed(), TV::ChangeSubtitleDelay(), TV::ChangeSubtitleZoom(), TV::ChangeTimeStretch(), TV::ChangeVolume(), TV::ChannelEditXDSFill(), TV::ContextIsPaused(), TV::CreatePBP(), TV::customEvent(), TV::DoArbSeek(), TV::DoChangePictureAttribute(), TV::DoEditSchedule(), TV::DoJumpChapter(), TV::DoPlay(), TV::DoPlayerSeek(), TV::DoPlayerSeekToFrame(), TV::DoSeek(), TV::DoSeekAbsolute(), TV::DoSkipCommercials(), TV::DoSwitchAngle(), TV::DoSwitchTitle(), TV::DoToggleNightMode(), TV::DoTogglePause(), TV::DoTogglePauseStart(), TV::DoTogglePictureAttribute(), TV::DoToggleStudioLevels(), TV::DrawUnusedRects(), TV::DVDJumpBack(), TV::DVDJumpForward(), TV::EnableUpmix(), TV::EnableVisualisation(), TV::event(), TV::GetAngleName(), TV::GetChapterTimes(), TV::GetCurrentAngle(), TV::GetCurrentChapter(), TV::GetCurrentTitle(), TV::GetNumAngles(), TV::GetNumChapters(), TV::GetNumTitles(), TV::GetOSDL(), TV::GetStatus(), TV::GetTitleDuration(), TV::GetTitleName(), TV::Handle3D(), TV::HandleDeinterlacer(), TV::HandleEndOfRecordingExitPromptTimerEvent(), TV::HandleIsNearEndWhenEmbeddingTimerEvent(), TV::HandleOSDAlreadyEditing(), TV::HandleOSDClosed(), TV::HandleOSDVideoExit(), TV::HandleSaveLastPlayPosEvent(), TV::HandleTrackAction(), IsEmbedding(), TV::IsPaused(), TV::ITVRestart(), TV::ManualZoomHandleAction(), TV::MenuItemDisplayCutlist(), TV::MenuItemDisplayPlayback(), TV::NormalSpeed(), TV::OSDDialogEvent(), TV::PauseAudioUntilBuffered(), TV::PauseLiveTV(), TV::PBPRestartMainPlayer(), TV::PIPAddPlayer(), TV::PlaybackLoop(), TV::PlaybackMenuInit(), TV::PrepareToExitPlayer(), TV::ProcessKeypressOrGesture(), TV::ProcessNetworkControlCommand(), TV::PxPToggleType(), ResizePIPWindow(), TV::ResizePIPWindow(), TV::RestartAllPlayers(), TV::SaveBottomLine(), TV::SeekHandleAction(), TV::SetActive(), TV::SetAutoCommercialSkip(), TV::SetBookmark(), TV::SetFFRew(), StartEmbedding(), TV::StartProgramEditMode(), TV::StartTV(), StopEmbedding(), TV::StopFFRew(), TV::StopStuff(), TV::SwitchInputs(), TV::TeardownAllPlayers(), TV::ToggleAdjustFill(), TV::ToggleAspectOverride(), TV::ToggleMoveBottomLine(), TV::ToggleMute(), TV::UnpauseLiveTV(), and TV::UpdateNavDialog().

◆ LockOSD()

void PlayerContext::LockOSD ( void  ) const

Definition at line 624 of file playercontext.cpp.

Referenced by TV::GetOSDL().

◆ UnlockOSD()

void PlayerContext::UnlockOSD ( void  ) const

Definition at line 629 of file playercontext.cpp.

Referenced by TV::GetOSDL().

◆ SetInitialTVState()

void PlayerContext::SetInitialTVState ( bool  islivetv)

determine initial tv state and playgroup for the recording

Parameters
islivetvtrue if recording is livetv

Definition at line 60 of file playercontext.cpp.

Referenced by TV::CreatePBP(), TV::CreatePIP(), TV::LiveTV(), and TV::Playback().

◆ SetPlayer()

void PlayerContext::SetPlayer ( MythPlayer newplayer)

◆ SetRecorder()

void PlayerContext::SetRecorder ( RemoteEncoder rec)

◆ SetTVChain()

void PlayerContext::SetTVChain ( LiveTVChain chain)

Definition at line 811 of file playercontext.cpp.

Referenced by SetInitialTVState(), and TeardownPlayer().

◆ SetRingBuffer()

void PlayerContext::SetRingBuffer ( RingBuffer buf)

◆ SetPlayingInfo()

void PlayerContext::SetPlayingInfo ( const ProgramInfo info)

◆ SetPlayGroup()

void PlayerContext::SetPlayGroup ( const QString &  group)

Definition at line 873 of file playercontext.cpp.

Referenced by SetInitialTVState().

◆ SetPseudoLiveTV()

void PlayerContext::SetPseudoLiveTV ( const ProgramInfo pi,
PseudoState  new_state 
)

Definition at line 882 of file playercontext.cpp.

Referenced by TV::customEvent(), TV::QuickRecord(), and TV::SwitchInputs().

◆ SetPIPLocation()

void PlayerContext::SetPIPLocation ( int  loc)
inline

Definition at line 105 of file playercontext.h.

◆ SetPIPState()

void PlayerContext::SetPIPState ( PIPState  change)
inline

Definition at line 106 of file playercontext.h.

Referenced by TV::CreatePBP(), TV::CreatePIP(), and TV::PBPRestartMainPlayer().

◆ SetPlayerChangingBuffers()

void PlayerContext::SetPlayerChangingBuffers ( bool  val)
inline

◆ SetNoHardwareDecoders()

void PlayerContext::SetNoHardwareDecoders ( void  )
inline

Definition at line 108 of file playercontext.h.

Referenced by TV::CreatePBP(), and TV::CreatePIP().

◆ GetStandAlonePIPRect()

QRect PlayerContext::GetStandAlonePIPRect ( void  )

Get PIP more accurate display size for standalone PIP by factoring the aspect ratio of the video.

Definition at line 156 of file playercontext.cpp.

Referenced by ResizePIPWindow().

◆ GetPIPState()

PIPState PlayerContext::GetPIPState ( void  ) const
inline

◆ GetPreviousChannel()

QString PlayerContext::GetPreviousChannel ( void  ) const

Definition at line 544 of file playercontext.cpp.

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

◆ CalcPlayerSliderPosition()

bool PlayerContext::CalcPlayerSliderPosition ( osdInfo info,
bool  paddedFields = false 
) const

◆ GetCardID()

uint PlayerContext::GetCardID ( void  ) const
inline

◆ GetFilters()

QString PlayerContext::GetFilters ( const QString &  baseFilters) const

Definition at line 728 of file playercontext.cpp.

Referenced by MythPlayer::SetVideoFilters().

◆ GetPlayMessage()

QString PlayerContext::GetPlayMessage ( void  ) const

◆ GetState()

TVState PlayerContext::GetState ( void  ) const

◆ GetPlayingInfoMap()

bool PlayerContext::GetPlayingInfoMap ( InfoMap infoMap) const

◆ IsPIPSupported()

bool PlayerContext::IsPIPSupported ( void  ) const

Check if PIP is supported for current video renderer running.

Current support written for XV, Opengl and VDPAU. Not sure about ivtv.

Definition at line 103 of file playercontext.cpp.

Referenced by TV::IsPIPSupported().

◆ IsPBPSupported()

bool PlayerContext::IsPBPSupported ( void  ) const

Check if PBP is supported for current video renderer running.

Current support written for XV and Opengl. Not sure about ivtv.

Definition at line 121 of file playercontext.cpp.

Referenced by TV::IsPBPSupported().

◆ IsPIP()

bool PlayerContext::IsPIP ( void  ) const
inline

◆ IsPBP()

bool PlayerContext::IsPBP ( void  ) const
inline

◆ IsPrimaryPBP()

bool PlayerContext::IsPrimaryPBP ( void  ) const
inline

Definition at line 129 of file playercontext.h.

Referenced by MythPlayer::AVSync(), MythPlayer::AVSync2(), and MythPlayer::OpenFile().

◆ IsAudioNeeded()

bool PlayerContext::IsAudioNeeded ( void  ) const
inline

Definition at line 131 of file playercontext.h.

Referenced by CreatePlayer().

◆ IsNullVideoDesired()

bool PlayerContext::IsNullVideoDesired ( void  ) const
inline

Definition at line 133 of file playercontext.h.

Referenced by TV::StartEmbedding(), and TV::StartPlayer().

◆ IsPlayerChangingBuffers()

bool PlayerContext::IsPlayerChangingBuffers ( void  ) const
inline

◆ IsEmbedding()

bool PlayerContext::IsEmbedding ( void  ) const

Definition at line 265 of file playercontext.cpp.

Referenced by TV::StartEmbedding(), and TV::StopEmbedding().

◆ HasPlayer()

bool PlayerContext::HasPlayer ( void  ) const

◆ IsPlayerErrored()

bool PlayerContext::IsPlayerErrored ( void  ) const

Definition at line 289 of file playercontext.cpp.

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

◆ IsPlayerRecoverable()

bool PlayerContext::IsPlayerRecoverable ( void  ) const

Definition at line 295 of file playercontext.cpp.

Referenced by TV::timerEvent().

◆ IsPlayerDecoderErrored()

bool PlayerContext::IsPlayerDecoderErrored ( void  ) const

Definition at line 301 of file playercontext.cpp.

Referenced by TV::timerEvent().

◆ IsPlayerPlaying()

bool PlayerContext::IsPlayerPlaying ( void  ) const

◆ IsRecorderErrored()

bool PlayerContext::IsRecorderErrored ( void  ) const

Definition at line 351 of file playercontext.cpp.

Referenced by MythPlayer::EventLoop(), and TV::timerEvent().

◆ InStateChange()

bool PlayerContext::InStateChange ( void  ) const

Definition at line 634 of file playercontext.cpp.

Referenced by TV::GetState(), and TV::HandlePseudoLiveTVTimerEvent().

◆ IsErrored()

bool PlayerContext::IsErrored ( void  ) const
inline

This is set if the player encountered some irrecoverable error.

Definition at line 144 of file playercontext.h.

Referenced by TV::HandleStateChange(), TV::IsPaused(), and TV::timerEvent().

◆ IsSameProgram()

bool PlayerContext::IsSameProgram ( const ProgramInfo p) const

Definition at line 718 of file playercontext.cpp.

Referenced by TV::IsSameProgram().

◆ IsValidLiveTV()

bool PlayerContext::IsValidLiveTV ( void  ) const
inline

Definition at line 146 of file playercontext.h.

Member Data Documentation

◆ m_recUsage

QString PlayerContext::m_recUsage

Definition at line 150 of file playercontext.h.

Referenced by SetPlayingInfo().

◆ m_player

MythPlayer* PlayerContext::m_player {nullptr}

Definition at line 151 of file playercontext.h.

Referenced by TV::ActiveHandleAction(), TV::ActivePostQHandleAction(), CalcPlayerSliderPosition(), TV::ChangeAudioSync(), TV::ChangeChannel(), TV::ChangeSpeed(), TV::ChangeSubtitleDelay(), TV::ChangeSubtitleZoom(), TV::ChangeTimeStretch(), TV::ChangeVolume(), TV::ChannelEditXDSFill(), DeleteMap::CleanMap(), TV::ContextIsPaused(), TV::CreatePBP(), TV::customEvent(), TV::DiscMenuHandleAction(), TV::DoArbSeek(), TV::DoChangePictureAttribute(), TV::DoEditSchedule(), TV::DoJumpChapter(), TV::DoPlay(), TV::DoPlayerSeek(), TV::DoPlayerSeekToFrame(), TV::DoSeek(), TV::DoSeekAbsolute(), TV::DoSkipCommercials(), TV::DoSwitchAngle(), TV::DoSwitchTitle(), TV::DoToggleNightMode(), TV::DoTogglePause(), TV::DoTogglePauseStart(), TV::DoTogglePictureAttribute(), TV::DoToggleStudioLevels(), TV::DrawUnusedRects(), TV::DVDJumpBack(), TV::DVDJumpForward(), TV::EnableUpmix(), TV::EnableVisualisation(), TV::event(), TV::GetAngleName(), TV::GetChapterTimes(), TV::GetCurrentAngle(), TV::GetCurrentChapter(), TV::GetCurrentTitle(), DeleteMap::GetLastFrame(), DeleteMap::GetNearestMark(), TV::GetNumAngles(), TV::GetNumChapters(), TV::GetNumTitles(), TV::GetOSDL(), Transcode::GetPlayer(), GetPlayingInfoMap(), PreviewGenerator::GetScreenGrab(), GetStandAlonePIPRect(), TV::GetStatus(), TV::GetTitleDuration(), TV::GetTitleName(), TV::Handle3D(), DeleteMap::HandleAction(), TV::HandleDeinterlacer(), TV::HandleEndOfRecordingExitPromptTimerEvent(), TV::HandleIsNearEndWhenEmbeddingTimerEvent(), TV::HandleOSDAlreadyEditing(), TV::HandleOSDClosed(), TV::HandleOSDCutpoint(), TV::HandleOSDVideoExit(), HandlePlayerSpeedChangeEOF(), HandlePlayerSpeedChangeFFRew(), TV::HandleSaveLastPlayPosEvent(), TV::HandleStateChange(), TV::HandleTrackAction(), HasPlayer(), IsEmbedding(), TV::IsPaused(), IsPBPSupported(), IsPIPSupported(), IsPlayerDecoderErrored(), IsPlayerErrored(), IsPlayerPlaying(), IsPlayerRecoverable(), TV::ITVRestart(), LockOSD(), TV::ManualZoomHandleAction(), TV::MenuItemDisplayCutlist(), TV::MenuItemDisplayPlayback(), DeleteMap::Move(), DeleteMap::NewCut(), TV::NormalSpeed(), TV::OSDDialogEvent(), TV::PauseAudioUntilBuffered(), TV::PauseLiveTV(), TV::PBPRestartMainPlayer(), TV::PIPAddPlayer(), TV::PIPRemovePlayer(), TV::PlaybackLoop(), TV::PlaybackMenuInit(), TV::PrepareToExitPlayer(), TV::ProcessKeypressOrGesture(), TV::ProcessNetworkControlCommand(), TV::PxPSwap(), TV::PxPToggleType(), ResizePIPWindow(), TV::ResizePIPWindow(), TV::RestartAllPlayers(), TV::RestartMainPlayer(), TV::SaveBottomLine(), TV::SeekHandleAction(), TV::SetActive(), TV::SetAutoCommercialSkip(), TV::SetBookmark(), TV::SetFFRew(), SetPlayer(), TV::ShowOSDPromptDeleteRecording(), StartEmbedding(), StartPlaying(), TV::StartProgramEditMode(), TV::StartTV(), StopEmbedding(), TV::StopFFRew(), StopPlaying(), TV::SwitchInputs(), TV::TeardownAllPlayers(), TV::timerEvent(), TV::ToggleAdjustFill(), TV::ToggleAspectOverride(), TV::ToggleMoveBottomLine(), TV::ToggleMute(), TV::ToggleOSDDebug(), DeleteMap::TrackerReset(), DeleteMap::TranslatePositionFrameToMs(), DeleteMap::TranslatePositionMsToFrame(), UnlockOSD(), TV::UnpauseLiveTV(), TV::UpdateNavDialog(), DeleteMap::UpdateOSD(), TV::UpdateOSDDebug(), and UpdateTVChain().

◆ m_playerUnsafe

volatile bool PlayerContext::m_playerUnsafe {false}

Definition at line 152 of file playercontext.h.

◆ m_recorder

RemoteEncoder* PlayerContext::m_recorder {nullptr}

◆ m_tvchain

LiveTVChain* PlayerContext::m_tvchain {nullptr}

◆ m_buffer

RingBuffer* PlayerContext::m_buffer {nullptr}

Definition at line 155 of file playercontext.h.

Referenced by TV::ActiveHandleAction(), MythDVDPlayer::CalcMaxFFTime(), MythDVDPlayer::ChangeSpeed(), TV::ChangeVolume(), MythBDPlayer::CreateDecoder(), MythDVDPlayer::CreateDecoder(), MythPlayer::CreateDecoder(), TV::CreatePBP(), CreatePlayer(), TV::customEvent(), MythDVDPlayer::DecoderGetFrameREW(), MythDVDPlayer::DisableCaptions(), TV::DiscMenuHandleAction(), MythDVDPlayer::DisplayDVDButton(), MythBDPlayer::DisplayMenu(), MythBDPlayer::DisplayPauseFrame(), MythDVDPlayer::DisplayPauseFrame(), MythPlayer::DoFastForward(), MythDVDPlayer::DoJumpChapter(), TV::DoPlayerSeek(), TV::DoPlayerSeekToFrame(), MythPlayer::DoRewind(), TV::DoTogglePauseFinish(), TV::DoTogglePauseStart(), TV::DVDJumpBack(), TV::DVDJumpForward(), MythDVDPlayer::EnableCaptions(), MythDVDPlayer::EventEnd(), MythPlayer::EventLoop(), MythBDPlayer::EventStart(), MythDVDPlayer::EventStart(), MythPlayer::FileChanged(), MythDVDPlayer::GetBookmark(), MythBDPlayer::GetBookmark(), MythPlayer::GetBookmark(), MythBDPlayer::GetChapter(), MythBDPlayer::GetChapterTimes(), MythDVDPlayer::GetChapterTimes(), MythBDPlayer::GetCurrentAngle(), MythDVDPlayer::GetCurrentAngle(), MythBDPlayer::GetCurrentChapter(), MythDVDPlayer::GetCurrentChapter(), MythBDPlayer::GetCurrentTitle(), MythBDPlayer::GetNumAngles(), MythDVDPlayer::GetNumAngles(), MythBDPlayer::GetNumChapters(), MythDVDPlayer::GetNumChapters(), MythBDPlayer::GetNumTitles(), MythPlayer::GetPlaybackData(), MythDVDPlayer::GetSecondsPlayed(), MythBDPlayer::GetTitleDuration(), MythDVDPlayer::GoToDVDProgram(), MythBDPlayer::GoToMenu(), MythDVDPlayer::GoToMenu(), TV::HandleLCDTimerEvent(), TV::HandleStateChange(), MythDVDPlayer::InitialSeek(), TV::IsBookmarkAllowed(), MythPlayer::IsReallyNearEnd(), MythPlayer::JumpToProgram(), MythPlayer::JumpToStream(), MythBDPlayer::NextTitle(), MythPlayer::OpenFile(), TV::OSDDialogEvent(), MythPlayer::PauseBuffer(), TV::PauseLiveTV(), TV::PBPRestartMainPlayer(), PIPTeardown(), TV::PlaybackMenuInit(), MythDVDPlayer::PrepareAudioSample(), MythBDPlayer::PrevTitle(), TV::ProcessKeypressOrGesture(), TV::ProcessNetworkControlCommand(), MythDVDPlayer::ReleaseNextVideoFrame(), TV::RestartAllPlayers(), MythDVDPlayer::SeekForScreenGrab(), MythBDPlayer::SetBookmark(), MythDVDPlayer::SetBookmark(), TV::SetFFRew(), SetRingBuffer(), MythPlayer::SetStream(), MythDVDPlayer::SetTrack(), TV::ShowLCDDVDInfo(), TV::ShowOSDStopWatchingRecording(), MythDVDPlayer::StillFrameCheck(), TV::StopStuff(), MythBDPlayer::SwitchAngle(), MythDVDPlayer::SwitchAngle(), TV::SwitchInputs(), MythBDPlayer::SwitchTitle(), MythPlayer::SwitchToProgram(), TV::timerEvent(), TV::ToggleOSDDebug(), MythPlayer::UnpauseBuffer(), TV::UnpauseLiveTV(), MythBDPlayer::VideoLoop(), MythDVDPlayer::VideoLoop(), MythBDPlayer::VideoStart(), and MythDVDPlayer::VideoStart().

◆ m_playingInfo

ProgramInfo* PlayerContext::m_playingInfo {nullptr}

Currently playing info.

Definition at line 156 of file playercontext.h.

Referenced by TVBrowseHelper::BrowseStart(), TV::ChangeChannel(), TV::CommitQueuedInput(), MythBDPlayer::CreateDecoder(), MythDVDPlayer::CreateDecoder(), MythPlayer::CreateDecoder(), TV::customEvent(), MythPlayer::DisableEdit(), TV::DoEditSchedule(), TV::DoPlay(), TV::DoQueueTranscode(), TV::DoTogglePause(), MythPlayer::EnableEdit(), MythPlayer::EventLoop(), MythBDPlayer::EventStart(), MythDVDPlayer::EventStart(), MythPlayer::EventStart(), MythPlayer::FileChanged(), TV::FillOSDMenuJumpRec(), get_chanid(), MythDVDPlayer::GetBookmark(), MythBDPlayer::GetBookmark(), MythPlayer::GetBookmark(), GetFilters(), GetPlayingInfoMap(), MythPlayer::GetRawVideoFrame(), TV::GetRecordingGroup(), TV::GetStatus(), TV::HandleOSDAlreadyEditing(), TV::HandleSaveLastPlayPosEvent(), TV::HandleStateChange(), TV::IsBookmarkAllowed(), TV::IsDeleteAllowed(), DeleteMap::IsFileEditing(), MythPlayer::IsNearEnd(), IsSameProgram(), DeleteMap::IsSaved(), TV::ITVRestart(), DeleteMap::LoadAutoSaveMap(), CommBreakMap::LoadMap(), DeleteMap::LoadMap(), MythPlayer::OpenDummy(), MythPlayer::OpenFile(), TV::PlaybackMenuInit(), TV::PrepareToExitPlayer(), TV::ProcessNetworkControlCommand(), TV::QuickRecord(), MythCCExtractorPlayer::run(), DeleteMap::SaveMap(), MythBDPlayer::SetBookmark(), MythDVDPlayer::SetBookmark(), MythPlayer::SetBookmark(), DeleteMap::SetFileEditing(), SetInitialTVState(), SetPlayingInfo(), MythPlayer::SetWatched(), TV::ShowLCDChannelInfo(), TV::ShowOSDPromptDeleteRecording(), TV::ShowOSDStopWatchingRecording(), TV::StartProgramEditMode(), TV::SwitchInputs(), TV::ToggleAutoExpire(), MythPlayer::TranscodeGetNextFrame(), and DeleteMap::UpdateOSD().

◆ m_playingLen

long long PlayerContext::m_playingLen {0}

Initial CalculateLength()

Definition at line 157 of file playercontext.h.

Referenced by CreatePlayer(), and SetPlayingInfo().

◆ m_nohardwaredecoders

bool PlayerContext::m_nohardwaredecoders {false}

Definition at line 158 of file playercontext.h.

Referenced by CreatePlayer().

◆ m_lastCardid

int PlayerContext::m_lastCardid {-1}

CardID of current/last recorder.

Definition at line 159 of file playercontext.h.

Referenced by TVBrowseHelper::BrowseChannel(), and SetRecorder().

◆ m_ffRewState

int PlayerContext::m_ffRewState {0}

◆ m_ffRewIndex

int PlayerContext::m_ffRewIndex {0}

Index into m_ffRewSpeeds for FF and Rewind speeds.

Definition at line 163 of file playercontext.h.

Referenced by TV::ChangeFFRew(), HandlePlayerSpeedChangeFFRew(), TV::Init(), TV::SetFFRew(), TV::StopFFRew(), and TeardownPlayer().

◆ m_ffRewSpeed

int PlayerContext::m_ffRewSpeed {0}

◆ m_playingState

TVState PlayerContext::m_playingState {kState_None}

Definition at line 166 of file playercontext.h.

Referenced by GetPlayingInfoMap(), GetState(), and TV::HandleStateChange().

◆ m_errored

bool PlayerContext::m_errored {false}

Definition at line 168 of file playercontext.h.

Referenced by TV::PlaybackLoop(), TV::SetErrored(), and TV::StartTV().

◆ m_prevChan

StringDeque PlayerContext::m_prevChan

◆ m_pseudoLiveTVRec

ProgramInfo* PlayerContext::m_pseudoLiveTVRec {nullptr}

Definition at line 174 of file playercontext.h.

Referenced by TV::HandlePseudoLiveTVTimerEvent(), and SetPseudoLiveTV().

◆ m_pseudoLiveTVState

PseudoState PlayerContext::m_pseudoLiveTVState {kPseudoNormalLiveTV}

◆ m_fftime

int PlayerContext::m_fftime {0}

◆ m_rewtime

int PlayerContext::m_rewtime {0}

◆ m_jumptime

int PlayerContext::m_jumptime {0}

◆ m_tsNormal

float PlayerContext::m_tsNormal {1.0F}

Time stretch speed, 1.0F for normal playback.

Begins at 1.0F meaning normal playback, but can be increased or decreased to speedup or slowdown playback. Ignored when doing Fast Forward or Rewind.

Definition at line 186 of file playercontext.h.

Referenced by TV::ChangeSpeed(), TV::ChangeTimeStretch(), CreatePlayer(), TV::DoPlay(), TV::DoTogglePauseStart(), GetPlayMessage(), HandlePlayerSpeedChangeEOF(), TV::Init(), TV::NormalSpeed(), TV::OSDDialogEvent(), TV::PlaybackMenuInit(), TV::ProcessNetworkControlCommand(), SetPlayGroup(), TV::StopFFRew(), TeardownPlayer(), TV::ToggleTimeStretch(), and TV::UnpauseLiveTV().

◆ m_tsAlt

float PlayerContext::m_tsAlt {1.5F}

Definition at line 187 of file playercontext.h.

Referenced by SetPlayGroup(), and TV::ToggleTimeStretch().

◆ m_playingInfoLock

QMutex PlayerContext::m_playingInfoLock {QMutex::Recursive}
mutable

Definition at line 189 of file playercontext.h.

Referenced by LockPlayingInfo(), SetPlayingInfo(), and UnlockPlayingInfo().

◆ m_deletePlayerLock

QMutex PlayerContext::m_deletePlayerLock {QMutex::Recursive}
mutable

◆ m_stateLock

QMutex PlayerContext::m_stateLock {QMutex::Recursive}
mutable

◆ m_lastSignalMsg

QStringList PlayerContext::m_lastSignalMsg
mutable

Definition at line 194 of file playercontext.h.

Referenced by TV::PauseLiveTV(), TV::timerEvent(), and TV::UpdateOSDSignal().

◆ m_lastSignalMsgTime

MythTimer PlayerContext::m_lastSignalMsgTime
mutable

Definition at line 195 of file playercontext.h.

Referenced by TV::ActiveHandleAction(), PlayerContext(), and TV::UpdateOSDSignal().

◆ m_lastSignalUIInfo

InfoMap PlayerContext::m_lastSignalUIInfo
mutable

◆ m_lastSignalUIInfoTime

MythTimer PlayerContext::m_lastSignalUIInfoTime
mutable

Definition at line 197 of file playercontext.h.

Referenced by TV::UpdateOSDSignal().

◆ m_nextState

MythDeque<TVState> PlayerContext::m_nextState

◆ m_pipState

PIPState PlayerContext::m_pipState {kPIPOff}

Definition at line 203 of file playercontext.h.

Referenced by CreatePlayer(), and ResizePIPWindow().

◆ m_pipRect

QRect PlayerContext::m_pipRect {0,0,0,0}

◆ m_parentWidget

QWidget* PlayerContext::m_parentWidget {nullptr}

Definition at line 205 of file playercontext.h.

Referenced by CreatePIPWindow(), PIPTeardown(), and StartPIPPlayer().

◆ m_pipLocation

int PlayerContext::m_pipLocation {0}

Position of PIP on TV screen.

Definition at line 207 of file playercontext.h.

Referenced by CreatePIPWindow().

◆ m_useNullVideo

bool PlayerContext::m_useNullVideo {false}

True iff software scaled PIP should be used.

Definition at line 209 of file playercontext.h.

Referenced by CreatePlayer(), PIPTeardown(), and StartPIPPlayer().

◆ kSMExitTimeout

const uint PlayerContext::kSMExitTimeout = 2000
static

Timeout after last Signal Monitor message for ignoring OSD when exiting.

Definition at line 212 of file playercontext.h.

Referenced by TV::ActiveHandleAction(), and PlayerContext().

◆ kMaxChannelHistory

const uint PlayerContext::kMaxChannelHistory = 30
static

Definition at line 213 of file playercontext.h.

Referenced by PushPreviousChannel().


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