Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CApplicationPlayer Class Reference

#include <ApplicationPlayer.h>

Inheritance diagram for CApplicationPlayer:
IApplicationComponent

Public Member Functions

 CApplicationPlayer ()=default
 
void ClosePlayer ()
 
void ResetPlayer ()
 
std::string GetCurrentPlayer () const
 
float GetPlaySpeed () const
 
float GetPlayTempo () const
 
bool HasPlayer () const
 
bool OpenFile (const CFileItem &item, const CPlayerOptions &options, const CPlayerCoreFactory &factory, const std::string &playerName, IPlayerCallback &callback)
 
void OpenNext (const CPlayerCoreFactory &factory)
 
void SetPlaySpeed (float speed)
 
void SetTempo (float tempo)
 
void FrameAdvance (int frames)
 
void FrameMove ()
 
void Render (bool clear, uint32_t alpha=255, bool gui=true)
 
void FlushRenderer ()
 
void SetRenderViewMode (int mode, float zoom, float par, float shift, bool stretch)
 
float GetRenderAspectRatio () const
 
bool GetRects (CRect &source, CRect &dest, CRect &view) const
 
unsigned int GetOrientation () const
 
void TriggerUpdateResolution ()
 
bool IsRenderingVideo () const
 
bool IsRenderingGuiLayer () const
 
bool IsRenderingVideoLayer () const
 
bool Supports (EINTERLACEMETHOD method) const
 
EINTERLACEMETHOD GetDeinterlacingMethodDefault () const
 
bool Supports (ESCALINGMETHOD method) const
 
bool Supports (ERENDERFEATURE feature) const
 
unsigned int RenderCaptureAlloc ()
 
void RenderCapture (unsigned int captureId, unsigned int width, unsigned int height, int flags=0)
 
void RenderCaptureRelease (unsigned int captureId)
 
bool RenderCaptureGetPixels (unsigned int captureId, unsigned int millis, uint8_t *buffer, unsigned int size)
 
bool IsExternalPlaying () const
 
bool IsRemotePlaying () const
 
std::string GetName () const
 Get the name of the player in use.
 
void AddSubtitle (const std::string &strSubPath)
 
bool CanPause () const
 
bool CanSeek () const
 
int GetAudioDelay () const
 
void GetAudioCapabilities (std::vector< IPlayerAudioCaps > &caps) const
 
int GetAudioStream ()
 
int GetAudioStreamCount () const
 
void GetAudioStreamInfo (int index, AudioStreamInfo &info) const
 
int GetCacheLevel () const
 
float GetCachePercentage () const
 
int GetChapterCount () const
 
int GetChapter () const
 
void GetChapterName (std::string &strChapterName, int chapterIdx=-1) const
 
int64_t GetChapterPos (int chapterIdx=-1) const
 
float GetPercentage () const
 
std::string GetPlayerState ()
 
KODI::PLAYLIST::Id GetPreferredPlaylist () const
 
int GetSubtitleDelay () const
 
int GetSubtitle ()
 
void GetSubtitleCapabilities (std::vector< IPlayerSubtitleCaps > &caps) const
 
int GetSubtitleCount () const
 
void GetSubtitleStreamInfo (int index, SubtitleStreamInfo &info) const
 
bool GetSubtitleVisible () const
 
bool HasTeletextCache () const
 
std::shared_ptr< TextCacheStruct_tGetTeletextCache ()
 
int64_t GetTime () const
 
int64_t GetMinTime () const
 
int64_t GetMaxTime () const
 
time_t GetStartTime () const
 
int64_t GetTotalTime () const
 
int GetVideoStream ()
 
int GetVideoStreamCount () const
 
void GetVideoStreamInfo (int streamId, VideoStreamInfo &info) const
 
int GetPrograms (std::vector< ProgramInfo > &programs)
 
void SetProgram (int progId)
 
int GetProgramsCount () const
 
bool HasAudio () const
 
MenuType GetSupportedMenuType () const
 Get the supported menu type.
 
bool HasVideo () const
 
bool HasGame () const
 
bool HasRDS () const
 
bool IsCaching () const
 
bool IsInMenu () const
 
bool IsPaused () const
 
bool IsPausedPlayback () const
 
bool IsPassthrough () const
 
bool IsPlaying () const
 
bool IsPlayingAudio () const
 
bool IsPlayingVideo () const
 
bool IsPlayingGame () const
 
bool IsPlayingRDS () const
 
void LoadPage (int p, int sp, unsigned char *buffer)
 
bool OnAction (const CAction &action)
 
void OnNothingToQueueNotify ()
 
void Pause ()
 
bool QueueNextFile (const CFileItem &file)
 
void Seek (bool bPlus=true, bool bLargeStep=false, bool bChapterOverride=false)
 
int SeekChapter (int iChapter)
 
void SeekPercentage (float fPercent=0)
 
bool SeekScene (Direction seekDirection)
 
void SeekTime (int64_t iTime=0)
 
void SeekTimeRelative (int64_t iTime=0)
 
void SetAudioStream (int iStream)
 
void SetAVDelay (float fValue=0.0f)
 
void SetDynamicRangeCompression (long drc)
 
void SetMute (bool bOnOff)
 
bool SetPlayerState (const std::string &state)
 
void SetSubtitle (int iStream)
 
void SetSubTitleDelay (float fValue=0.0f)
 
void SetSubtitleVisible (bool bVisible)
 
void SetSubtitleVerticalPosition (const int value, bool save)
 Set the subtitle vertical position, it depends on current screen resolution.
 
void SetTime (int64_t time)
 
void SetTotalTime (int64_t time)
 
void SetVideoStream (int iStream)
 
void SetVolume (float volume)
 
void SetSpeed (float speed)
 
bool SupportsTempo () const
 
CVideoSettings GetVideoSettings () const
 
void SetVideoSettings (CVideoSettings &settings)
 
CSeekHandlerGetSeekHandler ()
 
const CSeekHandlerGetSeekHandler () const
 
void SetUpdateStreamDetails ()
 
bool HasGameAgent () const
 Check if any players are playing a game.
 
- Public Member Functions inherited from IApplicationComponent
virtual ~IApplicationComponent ()=default
 

Constructor & Destructor Documentation

◆ CApplicationPlayer()

CApplicationPlayer::CApplicationPlayer ( )
default

Member Function Documentation

◆ AddSubtitle()

void CApplicationPlayer::AddSubtitle ( const std::string & strSubPath)

◆ CanPause()

bool CApplicationPlayer::CanPause ( ) const

◆ CanSeek()

bool CApplicationPlayer::CanSeek ( ) const

◆ ClosePlayer()

void CApplicationPlayer::ClosePlayer ( )

◆ FlushRenderer()

void CApplicationPlayer::FlushRenderer ( )

◆ FrameAdvance()

void CApplicationPlayer::FrameAdvance ( int frames)

◆ FrameMove()

void CApplicationPlayer::FrameMove ( )

◆ GetAudioCapabilities()

void CApplicationPlayer::GetAudioCapabilities ( std::vector< IPlayerAudioCaps > & caps) const

◆ GetAudioDelay()

int CApplicationPlayer::GetAudioDelay ( ) const

◆ GetAudioStream()

int CApplicationPlayer::GetAudioStream ( )

◆ GetAudioStreamCount()

int CApplicationPlayer::GetAudioStreamCount ( ) const

◆ GetAudioStreamInfo()

void CApplicationPlayer::GetAudioStreamInfo ( int index,
AudioStreamInfo & info ) const

◆ GetCacheLevel()

int CApplicationPlayer::GetCacheLevel ( ) const

◆ GetCachePercentage()

float CApplicationPlayer::GetCachePercentage ( ) const

◆ GetChapter()

int CApplicationPlayer::GetChapter ( ) const

◆ GetChapterCount()

int CApplicationPlayer::GetChapterCount ( ) const

◆ GetChapterName()

void CApplicationPlayer::GetChapterName ( std::string & strChapterName,
int chapterIdx = -1 ) const

◆ GetChapterPos()

int64_t CApplicationPlayer::GetChapterPos ( int chapterIdx = -1) const

◆ GetCurrentPlayer()

std::string CApplicationPlayer::GetCurrentPlayer ( ) const

◆ GetDeinterlacingMethodDefault()

EINTERLACEMETHOD CApplicationPlayer::GetDeinterlacingMethodDefault ( ) const

◆ GetMaxTime()

int64_t CApplicationPlayer::GetMaxTime ( ) const

◆ GetMinTime()

int64_t CApplicationPlayer::GetMinTime ( ) const

◆ GetName()

std::string CApplicationPlayer::GetName ( ) const

Get the name of the player in use.

Returns
the player name if a player is active, otherwise it returns an empty string

◆ GetOrientation()

unsigned int CApplicationPlayer::GetOrientation ( ) const

◆ GetPercentage()

float CApplicationPlayer::GetPercentage ( ) const

◆ GetPlayerState()

std::string CApplicationPlayer::GetPlayerState ( )

◆ GetPlaySpeed()

float CApplicationPlayer::GetPlaySpeed ( ) const

◆ GetPlayTempo()

float CApplicationPlayer::GetPlayTempo ( ) const

◆ GetPreferredPlaylist()

PLAYLIST::Id CApplicationPlayer::GetPreferredPlaylist ( ) const

◆ GetPrograms()

int CApplicationPlayer::GetPrograms ( std::vector< ProgramInfo > & programs)

◆ GetProgramsCount()

int CApplicationPlayer::GetProgramsCount ( ) const

◆ GetRects()

bool CApplicationPlayer::GetRects ( CRect & source,
CRect & dest,
CRect & view ) const

◆ GetRenderAspectRatio()

float CApplicationPlayer::GetRenderAspectRatio ( ) const

◆ GetSeekHandler() [1/2]

CSeekHandler & CApplicationPlayer::GetSeekHandler ( )

◆ GetSeekHandler() [2/2]

const CSeekHandler & CApplicationPlayer::GetSeekHandler ( ) const

◆ GetStartTime()

time_t CApplicationPlayer::GetStartTime ( ) const

◆ GetSubtitle()

int CApplicationPlayer::GetSubtitle ( )

◆ GetSubtitleCapabilities()

void CApplicationPlayer::GetSubtitleCapabilities ( std::vector< IPlayerSubtitleCaps > & caps) const

◆ GetSubtitleCount()

int CApplicationPlayer::GetSubtitleCount ( ) const

◆ GetSubtitleDelay()

int CApplicationPlayer::GetSubtitleDelay ( ) const

◆ GetSubtitleStreamInfo()

void CApplicationPlayer::GetSubtitleStreamInfo ( int index,
SubtitleStreamInfo & info ) const

◆ GetSubtitleVisible()

bool CApplicationPlayer::GetSubtitleVisible ( ) const

◆ GetSupportedMenuType()

MenuType CApplicationPlayer::GetSupportedMenuType ( ) const

Get the supported menu type.

Returns
The supported menu type

◆ GetTeletextCache()

std::shared_ptr< TextCacheStruct_t > CApplicationPlayer::GetTeletextCache ( )

◆ GetTime()

int64_t CApplicationPlayer::GetTime ( ) const

◆ GetTotalTime()

int64_t CApplicationPlayer::GetTotalTime ( ) const

◆ GetVideoSettings()

CVideoSettings CApplicationPlayer::GetVideoSettings ( ) const

◆ GetVideoStream()

int CApplicationPlayer::GetVideoStream ( )

◆ GetVideoStreamCount()

int CApplicationPlayer::GetVideoStreamCount ( ) const

◆ GetVideoStreamInfo()

void CApplicationPlayer::GetVideoStreamInfo ( int streamId,
VideoStreamInfo & info ) const

◆ HasAudio()

bool CApplicationPlayer::HasAudio ( ) const

◆ HasGame()

bool CApplicationPlayer::HasGame ( ) const

◆ HasGameAgent()

bool CApplicationPlayer::HasGameAgent ( ) const

Check if any players are playing a game.

Returns
True if at least one player has an input device attached to the game, false otherwise

◆ HasPlayer()

bool CApplicationPlayer::HasPlayer ( ) const

◆ HasRDS()

bool CApplicationPlayer::HasRDS ( ) const

◆ HasTeletextCache()

bool CApplicationPlayer::HasTeletextCache ( ) const

◆ HasVideo()

bool CApplicationPlayer::HasVideo ( ) const

◆ IsCaching()

bool CApplicationPlayer::IsCaching ( ) const

◆ IsExternalPlaying()

bool CApplicationPlayer::IsExternalPlaying ( ) const

◆ IsInMenu()

bool CApplicationPlayer::IsInMenu ( ) const

◆ IsPassthrough()

bool CApplicationPlayer::IsPassthrough ( ) const

◆ IsPaused()

bool CApplicationPlayer::IsPaused ( ) const

◆ IsPausedPlayback()

bool CApplicationPlayer::IsPausedPlayback ( ) const

◆ IsPlaying()

bool CApplicationPlayer::IsPlaying ( ) const

◆ IsPlayingAudio()

bool CApplicationPlayer::IsPlayingAudio ( ) const

◆ IsPlayingGame()

bool CApplicationPlayer::IsPlayingGame ( ) const

◆ IsPlayingRDS()

bool CApplicationPlayer::IsPlayingRDS ( ) const

◆ IsPlayingVideo()

bool CApplicationPlayer::IsPlayingVideo ( ) const

◆ IsRemotePlaying()

bool CApplicationPlayer::IsRemotePlaying ( ) const

◆ IsRenderingGuiLayer()

bool CApplicationPlayer::IsRenderingGuiLayer ( ) const

◆ IsRenderingVideo()

bool CApplicationPlayer::IsRenderingVideo ( ) const

◆ IsRenderingVideoLayer()

bool CApplicationPlayer::IsRenderingVideoLayer ( ) const

◆ LoadPage()

void CApplicationPlayer::LoadPage ( int p,
int sp,
unsigned char * buffer )

◆ OnAction()

bool CApplicationPlayer::OnAction ( const CAction & action)

◆ OnNothingToQueueNotify()

void CApplicationPlayer::OnNothingToQueueNotify ( )

◆ OpenFile()

bool CApplicationPlayer::OpenFile ( const CFileItem & item,
const CPlayerOptions & options,
const CPlayerCoreFactory & factory,
const std::string & playerName,
IPlayerCallback & callback )

◆ OpenNext()

void CApplicationPlayer::OpenNext ( const CPlayerCoreFactory & factory)

◆ Pause()

void CApplicationPlayer::Pause ( )

◆ QueueNextFile()

bool CApplicationPlayer::QueueNextFile ( const CFileItem & file)

◆ Render()

void CApplicationPlayer::Render ( bool clear,
uint32_t alpha = 255,
bool gui = true )

◆ RenderCapture()

void CApplicationPlayer::RenderCapture ( unsigned int captureId,
unsigned int width,
unsigned int height,
int flags = 0 )

◆ RenderCaptureAlloc()

unsigned int CApplicationPlayer::RenderCaptureAlloc ( )

◆ RenderCaptureGetPixels()

bool CApplicationPlayer::RenderCaptureGetPixels ( unsigned int captureId,
unsigned int millis,
uint8_t * buffer,
unsigned int size )

◆ RenderCaptureRelease()

void CApplicationPlayer::RenderCaptureRelease ( unsigned int captureId)

◆ ResetPlayer()

void CApplicationPlayer::ResetPlayer ( )

◆ Seek()

void CApplicationPlayer::Seek ( bool bPlus = true,
bool bLargeStep = false,
bool bChapterOverride = false )

◆ SeekChapter()

int CApplicationPlayer::SeekChapter ( int iChapter)

◆ SeekPercentage()

void CApplicationPlayer::SeekPercentage ( float fPercent = 0)

◆ SeekScene()

bool CApplicationPlayer::SeekScene ( Direction seekDirection)

◆ SeekTime()

void CApplicationPlayer::SeekTime ( int64_t iTime = 0)

◆ SeekTimeRelative()

void CApplicationPlayer::SeekTimeRelative ( int64_t iTime = 0)

◆ SetAudioStream()

void CApplicationPlayer::SetAudioStream ( int iStream)

◆ SetAVDelay()

void CApplicationPlayer::SetAVDelay ( float fValue = 0.0f)

◆ SetDynamicRangeCompression()

void CApplicationPlayer::SetDynamicRangeCompression ( long drc)

◆ SetMute()

void CApplicationPlayer::SetMute ( bool bOnOff)

◆ SetPlayerState()

bool CApplicationPlayer::SetPlayerState ( const std::string & state)

◆ SetPlaySpeed()

void CApplicationPlayer::SetPlaySpeed ( float speed)

◆ SetProgram()

void CApplicationPlayer::SetProgram ( int progId)

◆ SetRenderViewMode()

void CApplicationPlayer::SetRenderViewMode ( int mode,
float zoom,
float par,
float shift,
bool stretch )

◆ SetSpeed()

void CApplicationPlayer::SetSpeed ( float speed)

◆ SetSubtitle()

void CApplicationPlayer::SetSubtitle ( int iStream)

◆ SetSubTitleDelay()

void CApplicationPlayer::SetSubTitleDelay ( float fValue = 0.0f)

◆ SetSubtitleVerticalPosition()

void CApplicationPlayer::SetSubtitleVerticalPosition ( const int value,
bool save )

Set the subtitle vertical position, it depends on current screen resolution.

Parameters
valueThe subtitle position in pixels
saveIf true, the value will be saved to resolution info

◆ SetSubtitleVisible()

void CApplicationPlayer::SetSubtitleVisible ( bool bVisible)

◆ SetTempo()

void CApplicationPlayer::SetTempo ( float tempo)

◆ SetTime()

void CApplicationPlayer::SetTime ( int64_t time)

◆ SetTotalTime()

void CApplicationPlayer::SetTotalTime ( int64_t time)

◆ SetUpdateStreamDetails()

void CApplicationPlayer::SetUpdateStreamDetails ( )

◆ SetVideoSettings()

void CApplicationPlayer::SetVideoSettings ( CVideoSettings & settings)

◆ SetVideoStream()

void CApplicationPlayer::SetVideoStream ( int iStream)

◆ SetVolume()

void CApplicationPlayer::SetVolume ( float volume)

◆ Supports() [1/3]

bool CApplicationPlayer::Supports ( EINTERLACEMETHOD method) const

◆ Supports() [2/3]

bool CApplicationPlayer::Supports ( ERENDERFEATURE feature) const

◆ Supports() [3/3]

bool CApplicationPlayer::Supports ( ESCALINGMETHOD method) const

◆ SupportsTempo()

bool CApplicationPlayer::SupportsTempo ( ) const

◆ TriggerUpdateResolution()

void CApplicationPlayer::TriggerUpdateResolution ( )

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