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

#include <IPlayer.h>

Inheritance diagram for IPlayer:
CExternalPlayer CVideoPlayer KODI::RETRO::CRetroPlayer PAPlayer UPNP::CUPnPPlayer

Public Member Functions

 IPlayer (IPlayerCallback &callback)
 
virtual ~IPlayer ()=default
 
virtual bool Initialize (TiXmlElement *pConfig)
 
virtual bool OpenFile (const CFileItem &file, const CPlayerOptions &options)
 
virtual bool QueueNextFile (const CFileItem &file)
 
virtual void OnNothingToQueueNotify ()
 
virtual bool CloseFile (bool reopen=false)=0
 
virtual bool IsPlaying () const
 
virtual bool CanPause () const
 
virtual void Pause ()=0
 
virtual bool HasVideo () const =0
 
virtual bool HasAudio () const =0
 
virtual bool HasGame () const
 
virtual bool HasRDS () const
 
virtual bool HasID3 () const
 
virtual bool IsPassthrough () const
 
virtual bool CanSeek () const
 
virtual void Seek (bool bPlus=true, bool bLargeStep=false, bool bChapterOverride=false)=0
 
virtual bool SeekScene (bool bPlus=true)
 
virtual void SeekPercentage (float fPercent=0)
 
virtual float GetCachePercentage () const
 
virtual void SetMute (bool bOnOff)
 
virtual void SetVolume (float volume)
 
virtual void SetDynamicRangeCompression (long drc)
 
virtual void SetAVDelay (float fValue=0.0f)
 
virtual float GetAVDelay ()
 
virtual void SetSubTitleDelay (float fValue=0.0f)
 
virtual float GetSubTitleDelay ()
 
virtual int GetSubtitleCount () const
 
virtual int GetSubtitle ()
 
virtual void GetSubtitleStreamInfo (int index, SubtitleStreamInfo &info) const
 
virtual void SetSubtitle (int iStream)
 
virtual bool GetSubtitleVisible () const
 
virtual void SetSubtitleVisible (bool bVisible)
 
virtual void SetSubtitleVerticalPosition (int value, bool save)
 Set the subtitle vertical position, it depends on current screen resolution.
 
virtual void AddSubtitle (const std::string &strSubPath)
 Adds the subtitle(s) provided by the given file to the available player streams and actives the first of the added stream(s). E.g., vob subs can contain multiple streams.
 
virtual int GetAudioStreamCount () const
 
virtual int GetAudioStream ()
 
virtual void SetAudioStream (int iStream)
 
virtual void GetAudioStreamInfo (int index, AudioStreamInfo &info) const
 
virtual int GetVideoStream () const
 
virtual int GetVideoStreamCount () const
 
virtual void GetVideoStreamInfo (int streamId, VideoStreamInfo &info) const
 
virtual void SetVideoStream (int iStream)
 
virtual int GetPrograms (std::vector< ProgramInfo > &programs)
 
virtual void SetProgram (int progId)
 
virtual int GetProgramsCount () const
 
virtual bool HasTeletextCache () const
 
virtual std::shared_ptr< TextCacheStruct_tGetTeletextCache ()
 
virtual void LoadPage (int p, int sp, unsigned char *buffer)
 
virtual int GetChapterCount () const
 
virtual int GetChapter () const
 
virtual void GetChapterName (std::string &strChapterName, int chapterIdx=-1) const
 
virtual int64_t GetChapterPos (int chapterIdx=-1) const
 
virtual int SeekChapter (int iChapter)
 
virtual void SeekTime (int64_t iTime=0)
 
virtual bool SeekTimeRelative (int64_t iTime)
 
virtual void SetTime (int64_t time)
 Sets the current time. This can be used for injecting the current time. This is not to be confused with a seek. It just can be used if endless streams contain multiple tracks in reality (like with airtunes)
 
virtual void SetTotalTime (int64_t time)
 Set the total time in milliseconds this can be used for injecting the duration in case its not available in the underlaying decoder (airtunes for example)
 
virtual void SetSpeed (float speed)=0
 
virtual void SetTempo (float tempo)
 
virtual bool SupportsTempo () const
 
virtual void FrameAdvance (int frames)
 
virtual bool IsCaching () const
 
virtual int GetCacheLevel () const
 
virtual bool IsInMenu () const
 
virtual MenuType GetSupportedMenuType () const
 Get the supported menu type.
 
virtual bool OnAction (const CAction &action)
 
virtual std::string GetPlayerState ()
 
virtual bool SetPlayerState (const std::string &state)
 
virtual void GetAudioCapabilities (std::vector< int > &audioCaps) const
 
virtual void GetSubtitleCapabilities (std::vector< int > &subCaps) const
 define the subtitle capabilities of the player
 
virtual void Render (bool clear, uint32_t alpha=255, bool gui=true)
 hook into render loop of render thread
 
virtual void FlushRenderer ()
 
virtual void SetRenderViewMode (int mode, float zoom, float par, float shift, bool stretch)
 
virtual float GetRenderAspectRatio () const
 
virtual void TriggerUpdateResolution ()
 
virtual bool IsRenderingVideo () const
 
virtual void GetRects (CRect &source, CRect &dest, CRect &view) const
 
virtual unsigned int GetOrientation () const
 
virtual bool Supports (EINTERLACEMETHOD method) const
 
virtual EINTERLACEMETHOD GetDeinterlacingMethodDefault () const
 
virtual bool Supports (ESCALINGMETHOD method) const
 
virtual bool Supports (ERENDERFEATURE feature) const
 
virtual unsigned int RenderCaptureAlloc ()
 
virtual void RenderCaptureRelease (unsigned int captureId)
 
virtual void RenderCapture (unsigned int captureId, unsigned int width, unsigned int height, int flags)
 
virtual bool RenderCaptureGetPixels (unsigned int captureId, unsigned int millis, uint8_t *buffer, unsigned int size)
 
virtual CVideoSettings GetVideoSettings () const
 
virtual void SetVideoSettings (CVideoSettings &settings)
 
virtual bool HasGameAgent () const
 Check if any players are playing a game.
 

Public Attributes

std::string m_name
 
std::string m_type
 

Protected Attributes

IPlayerCallbackm_callback
 

Constructor & Destructor Documentation

◆ IPlayer()

IPlayer::IPlayer ( IPlayerCallback & callback)
inlineexplicit

◆ ~IPlayer()

virtual IPlayer::~IPlayer ( )
virtualdefault

Member Function Documentation

◆ AddSubtitle()

virtual void IPlayer::AddSubtitle ( const std::string & strSubPath)
inlinevirtual

Adds the subtitle(s) provided by the given file to the available player streams and actives the first of the added stream(s). E.g., vob subs can contain multiple streams.

Parameters
[in]strSubPathThe full path of the subtitle file.

Reimplemented in CVideoPlayer.

◆ CanPause()

virtual bool IPlayer::CanPause ( ) const
inlinevirtual

Reimplemented in KODI::RETRO::CRetroPlayer, and CVideoPlayer.

◆ CanSeek()

virtual bool IPlayer::CanSeek ( ) const
inlinevirtual

◆ CloseFile()

virtual bool IPlayer::CloseFile ( bool reopen = false)
pure virtual

◆ FlushRenderer()

virtual void IPlayer::FlushRenderer ( )
inlinevirtual

Reimplemented in CVideoPlayer.

◆ FrameAdvance()

virtual void IPlayer::FrameAdvance ( int frames)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetAudioCapabilities()

virtual void IPlayer::GetAudioCapabilities ( std::vector< int > & audioCaps) const
inlinevirtual

Reimplemented in PAPlayer.

◆ GetAudioStream()

virtual int IPlayer::GetAudioStream ( )
inlinevirtual

Reimplemented in PAPlayer, and CVideoPlayer.

◆ GetAudioStreamCount()

virtual int IPlayer::GetAudioStreamCount ( ) const
inlinevirtual

Reimplemented in PAPlayer, and CVideoPlayer.

◆ GetAudioStreamInfo()

virtual void IPlayer::GetAudioStreamInfo ( int index,
AudioStreamInfo & info ) const
inlinevirtual

Reimplemented in PAPlayer, and CVideoPlayer.

◆ GetAVDelay()

virtual float IPlayer::GetAVDelay ( )
inlinevirtual

Reimplemented in CExternalPlayer, and CVideoPlayer.

◆ GetCacheLevel()

virtual int IPlayer::GetCacheLevel ( ) const
inlinevirtual

Reimplemented in PAPlayer, CVideoPlayer, and UPNP::CUPnPPlayer.

◆ GetCachePercentage()

virtual float IPlayer::GetCachePercentage ( ) const
inlinevirtual

Reimplemented in KODI::RETRO::CRetroPlayer, and CVideoPlayer.

◆ GetChapter()

virtual int IPlayer::GetChapter ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetChapterCount()

virtual int IPlayer::GetChapterCount ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetChapterName()

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

Reimplemented in CVideoPlayer.

◆ GetChapterPos()

virtual int64_t IPlayer::GetChapterPos ( int chapterIdx = -1) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetDeinterlacingMethodDefault()

virtual EINTERLACEMETHOD IPlayer::GetDeinterlacingMethodDefault ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetOrientation()

virtual unsigned int IPlayer::GetOrientation ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetPlayerState()

virtual std::string IPlayer::GetPlayerState ( )
inlinevirtual

Reimplemented in KODI::RETRO::CRetroPlayer, and CVideoPlayer.

◆ GetPrograms()

virtual int IPlayer::GetPrograms ( std::vector< ProgramInfo > & programs)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetProgramsCount()

virtual int IPlayer::GetProgramsCount ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetRects()

virtual void IPlayer::GetRects ( CRect & source,
CRect & dest,
CRect & view ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetRenderAspectRatio()

virtual float IPlayer::GetRenderAspectRatio ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetSubtitle()

virtual int IPlayer::GetSubtitle ( )
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetSubtitleCapabilities()

virtual void IPlayer::GetSubtitleCapabilities ( std::vector< int > & subCaps) const
inlinevirtual

define the subtitle capabilities of the player

◆ GetSubtitleCount()

virtual int IPlayer::GetSubtitleCount ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetSubTitleDelay()

virtual float IPlayer::GetSubTitleDelay ( )
inlinevirtual

Reimplemented in CExternalPlayer, and CVideoPlayer.

◆ GetSubtitleStreamInfo()

virtual void IPlayer::GetSubtitleStreamInfo ( int index,
SubtitleStreamInfo & info ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetSubtitleVisible()

virtual bool IPlayer::GetSubtitleVisible ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetSupportedMenuType()

virtual MenuType IPlayer::GetSupportedMenuType ( ) const
inlinevirtual

Get the supported menu type.

Returns
The supported menu type

Reimplemented in CVideoPlayer.

◆ GetTeletextCache()

virtual std::shared_ptr< TextCacheStruct_t > IPlayer::GetTeletextCache ( )
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetVideoSettings()

virtual CVideoSettings IPlayer::GetVideoSettings ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetVideoStream()

virtual int IPlayer::GetVideoStream ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetVideoStreamCount()

virtual int IPlayer::GetVideoStreamCount ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ GetVideoStreamInfo()

virtual void IPlayer::GetVideoStreamInfo ( int streamId,
VideoStreamInfo & info ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ HasAudio()

virtual bool IPlayer::HasAudio ( ) const
pure virtual

◆ HasGame()

virtual bool IPlayer::HasGame ( ) const
inlinevirtual

Reimplemented in KODI::RETRO::CRetroPlayer.

◆ HasGameAgent()

virtual bool IPlayer::HasGameAgent ( ) const
inlinevirtual

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

Reimplemented in KODI::RETRO::CRetroPlayer.

◆ HasID3()

virtual bool IPlayer::HasID3 ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ HasRDS()

virtual bool IPlayer::HasRDS ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ HasTeletextCache()

virtual bool IPlayer::HasTeletextCache ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ HasVideo()

virtual bool IPlayer::HasVideo ( ) const
pure virtual

◆ Initialize()

virtual bool IPlayer::Initialize ( TiXmlElement * pConfig)
inlinevirtual

Reimplemented in CExternalPlayer.

◆ IsCaching()

virtual bool IPlayer::IsCaching ( ) const
inlinevirtual

Reimplemented in CVideoPlayer, and UPNP::CUPnPPlayer.

◆ IsInMenu()

virtual bool IPlayer::IsInMenu ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ IsPassthrough()

virtual bool IPlayer::IsPassthrough ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ IsPlaying()

virtual bool IPlayer::IsPlaying ( ) const
inlinevirtual

◆ IsRenderingVideo()

virtual bool IPlayer::IsRenderingVideo ( ) const
inlinevirtual

Reimplemented in KODI::RETRO::CRetroPlayer, and CVideoPlayer.

◆ LoadPage()

virtual void IPlayer::LoadPage ( int p,
int sp,
unsigned char * buffer )
inlinevirtual

Reimplemented in CVideoPlayer.

◆ OnAction()

virtual bool IPlayer::OnAction ( const CAction & action)
inlinevirtual

◆ OnNothingToQueueNotify()

virtual void IPlayer::OnNothingToQueueNotify ( )
inlinevirtual

Reimplemented in PAPlayer.

◆ OpenFile()

virtual bool IPlayer::OpenFile ( const CFileItem & file,
const CPlayerOptions & options )
inlinevirtual

◆ Pause()

virtual void IPlayer::Pause ( )
pure virtual

◆ QueueNextFile()

virtual bool IPlayer::QueueNextFile ( const CFileItem & file)
inlinevirtual

Reimplemented in PAPlayer, and UPNP::CUPnPPlayer.

◆ Render()

virtual void IPlayer::Render ( bool clear,
uint32_t alpha = 255,
bool gui = true )
inlinevirtual

hook into render loop of render thread

Reimplemented in KODI::RETRO::CRetroPlayer, and CVideoPlayer.

◆ RenderCapture()

virtual void IPlayer::RenderCapture ( unsigned int captureId,
unsigned int width,
unsigned int height,
int flags )
inlinevirtual

Reimplemented in CVideoPlayer.

◆ RenderCaptureAlloc()

virtual unsigned int IPlayer::RenderCaptureAlloc ( )
inlinevirtual

Reimplemented in CVideoPlayer.

◆ RenderCaptureGetPixels()

virtual bool IPlayer::RenderCaptureGetPixels ( unsigned int captureId,
unsigned int millis,
uint8_t * buffer,
unsigned int size )
inlinevirtual

Reimplemented in CVideoPlayer.

◆ RenderCaptureRelease()

virtual void IPlayer::RenderCaptureRelease ( unsigned int captureId)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ Seek()

virtual void IPlayer::Seek ( bool bPlus = true,
bool bLargeStep = false,
bool bChapterOverride = false )
pure virtual

◆ SeekChapter()

virtual int IPlayer::SeekChapter ( int iChapter)
inlinevirtual

Reimplemented in CVideoPlayer, and UPNP::CUPnPPlayer.

◆ SeekPercentage()

virtual void IPlayer::SeekPercentage ( float fPercent = 0)
inlinevirtual

◆ SeekScene()

virtual bool IPlayer::SeekScene ( bool bPlus = true)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ SeekTime()

virtual void IPlayer::SeekTime ( int64_t iTime = 0)
inlinevirtual

◆ SeekTimeRelative()

virtual bool IPlayer::SeekTimeRelative ( int64_t iTime)
inlinevirtual

Reimplemented in KODI::RETRO::CRetroPlayer, and CVideoPlayer.

◆ SetAudioStream()

virtual void IPlayer::SetAudioStream ( int iStream)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ SetAVDelay()

virtual void IPlayer::SetAVDelay ( float fValue = 0.0f)
inlinevirtual

Reimplemented in CExternalPlayer, and CVideoPlayer.

◆ SetDynamicRangeCompression()

virtual void IPlayer::SetDynamicRangeCompression ( long drc)
inlinevirtual

Reimplemented in CExternalPlayer, PAPlayer, and CVideoPlayer.

◆ SetMute()

virtual void IPlayer::SetMute ( bool bOnOff)
inlinevirtual

Reimplemented in KODI::RETRO::CRetroPlayer.

◆ SetPlayerState()

virtual bool IPlayer::SetPlayerState ( const std::string & state)
inlinevirtual

◆ SetProgram()

virtual void IPlayer::SetProgram ( int progId)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ SetRenderViewMode()

virtual void IPlayer::SetRenderViewMode ( int mode,
float zoom,
float par,
float shift,
bool stretch )
inlinevirtual

Reimplemented in CVideoPlayer.

◆ SetSpeed()

virtual void IPlayer::SetSpeed ( float speed)
pure virtual

◆ SetSubtitle()

virtual void IPlayer::SetSubtitle ( int iStream)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ SetSubTitleDelay()

virtual void IPlayer::SetSubTitleDelay ( float fValue = 0.0f)
inlinevirtual

Reimplemented in CExternalPlayer, and CVideoPlayer.

◆ SetSubtitleVerticalPosition()

virtual void IPlayer::SetSubtitleVerticalPosition ( int value,
bool save )
inlinevirtual

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

Reimplemented in CVideoPlayer.

◆ SetSubtitleVisible()

virtual void IPlayer::SetSubtitleVisible ( bool bVisible)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ SetTempo()

virtual void IPlayer::SetTempo ( float tempo)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ SetTime()

virtual void IPlayer::SetTime ( int64_t time)
inlinevirtual

Sets the current time. This can be used for injecting the current time. This is not to be confused with a seek. It just can be used if endless streams contain multiple tracks in reality (like with airtunes)

Reimplemented in PAPlayer.

◆ SetTotalTime()

virtual void IPlayer::SetTotalTime ( int64_t time)
inlinevirtual

Set the total time in milliseconds this can be used for injecting the duration in case its not available in the underlaying decoder (airtunes for example)

Reimplemented in PAPlayer.

◆ SetVideoSettings()

virtual void IPlayer::SetVideoSettings ( CVideoSettings & settings)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ SetVideoStream()

virtual void IPlayer::SetVideoStream ( int iStream)
inlinevirtual

Reimplemented in CVideoPlayer.

◆ SetVolume()

virtual void IPlayer::SetVolume ( float volume)
inlinevirtual

Reimplemented in CExternalPlayer, PAPlayer, and UPNP::CUPnPPlayer.

◆ Supports() [1/3]

virtual bool IPlayer::Supports ( EINTERLACEMETHOD method) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ Supports() [2/3]

virtual bool IPlayer::Supports ( ERENDERFEATURE feature) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ Supports() [3/3]

virtual bool IPlayer::Supports ( ESCALINGMETHOD method) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ SupportsTempo()

virtual bool IPlayer::SupportsTempo ( ) const
inlinevirtual

Reimplemented in CVideoPlayer.

◆ TriggerUpdateResolution()

virtual void IPlayer::TriggerUpdateResolution ( )
inlinevirtual

Reimplemented in CVideoPlayer.

Member Data Documentation

◆ m_callback

IPlayerCallback& IPlayer::m_callback
protected

◆ m_name

std::string IPlayer::m_name

◆ m_type

std::string IPlayer::m_type

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