Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CExternalPlayer Class Reference

#include <ExternalPlayer.h>

Inheritance diagram for CExternalPlayer:
IPlayer CThread

Public Types

enum  WARP_CURSOR {
  WARP_NONE = 0 , WARP_TOP_LEFT , WARP_TOP_RIGHT , WARP_BOTTOM_RIGHT ,
  WARP_BOTTOM_LEFT , WARP_CENTER
}
 

Public Member Functions

 CExternalPlayer (IPlayerCallback &callback)
 
 ~CExternalPlayer () override
 
bool Initialize (TiXmlElement *pConfig) override
 
bool OpenFile (const CFileItem &file, const CPlayerOptions &options) override
 
bool CloseFile (bool reopen=false) override
 
bool IsPlaying () const override
 
void Pause () override
 
bool HasVideo () const override
 
bool HasAudio () const override
 
bool CanSeek () override
 
void Seek (bool bPlus, bool bLargeStep, bool bChapterOverride) override
 
void SeekPercentage (float iPercent) override
 
void SetVolume (float volume) override
 
void SetDynamicRangeCompression (long drc) override
 
void SetAVDelay (float fValue=0.0f) override
 
float GetAVDelay () override
 
void SetSubTitleDelay (float fValue=0.0f) override
 
float GetSubTitleDelay () override
 
void SeekTime (int64_t iTime) override
 
void SetSpeed (float speed) override
 
void DoAudioWork () override
 
std::string GetPlayerState () override
 
bool SetPlayerState (const std::string &state) override
 
- Public Member Functions inherited from IPlayer
 IPlayer (IPlayerCallback &callback)
 
virtual ~IPlayer ()=default
 
virtual bool QueueNextFile (const CFileItem &file)
 
virtual void OnNothingToQueueNotify ()
 
virtual bool CanPause ()
 
virtual bool HasGame () const
 
virtual bool HasRDS () const
 
virtual bool IsPassthrough () const
 
virtual bool SeekScene (bool bPlus=true)
 
virtual float GetCachePercentage ()
 
virtual void SetMute (bool bOnOff)
 
virtual int GetSubtitleCount ()
 
virtual int GetSubtitle ()
 
virtual void GetSubtitleStreamInfo (int index, SubtitleStreamInfo &info)
 
virtual void SetSubtitle (int iStream)
 
virtual bool GetSubtitleVisible ()
 
virtual void SetSubtitleVisible (bool bVisible)
 
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. More...
 
virtual int GetAudioStreamCount ()
 
virtual int GetAudioStream ()
 
virtual void SetAudioStream (int iStream)
 
virtual void GetAudioStreamInfo (int index, AudioStreamInfo &info)
 
virtual int GetVideoStream () const
 
virtual int GetVideoStreamCount () const
 
virtual void GetVideoStreamInfo (int streamId, VideoStreamInfo &info)
 
virtual void SetVideoStream (int iStream)
 
virtual int GetPrograms (std::vector< ProgramInfo > &programs)
 
virtual void SetProgram (int progId)
 
virtual int GetProgramsCount ()
 
virtual std::shared_ptr< TextCacheStruct_tGetTeletextCache ()
 
virtual void LoadPage (int p, int sp, unsigned char *buffer)
 
virtual std::string GetRadioText (unsigned int line)
 
virtual int GetChapterCount ()
 
virtual int GetChapter ()
 
virtual void GetChapterName (std::string &strChapterName, int chapterIdx=-1)
 
virtual int64_t GetChapterPos (int chapterIdx=-1)
 
virtual int SeekChapter (int iChapter)
 
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) More...
 
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) More...
 
virtual void SetTempo (float tempo)
 
virtual bool SupportsTempo ()
 
virtual void FrameAdvance (int frames)
 
virtual bool IsCaching () const
 
virtual int GetCacheLevel () const
 
virtual bool IsInMenu () const
 
virtual bool HasMenu () const
 
virtual bool OnAction (const CAction &action)
 
virtual void GetAudioCapabilities (std::vector< int > &audioCaps)
 
virtual void GetSubtitleCapabilities (std::vector< int > &subCaps)
 define the subtitle capabilities of the player More...
 
virtual void Render (bool clear, uint32_t alpha=255, bool gui=true)
 hook into render loop of render thread More...
 
virtual void FlushRenderer ()
 
virtual void SetRenderViewMode (int mode, float zoom, float par, float shift, bool stretch)
 
virtual float GetRenderAspectRatio ()
 
virtual void TriggerUpdateResolution ()
 
virtual bool IsRenderingVideo ()
 
virtual bool Supports (EINTERLACEMETHOD method)
 
virtual EINTERLACEMETHOD GetDeinterlacingMethodDefault ()
 
virtual bool Supports (ESCALINGMETHOD method)
 
virtual bool Supports (ERENDERFEATURE feature)
 
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 ()
 
virtual void SetVideoSettings (CVideoSettings &settings)
 
virtual bool HasGameAgent ()
 Check if any players are playing a game. More...
 
- Public Member Functions inherited from CThread
 CThread (IRunnable *pRunnable, const char *ThreadName)
 
virtual ~CThread ()
 
void Create (bool bAutoDelete=false, unsigned stacksize=0)
 
void Sleep (unsigned int milliseconds)
 
int GetSchedRRPriority (void)
 
bool SetPrioritySched_RR (int iPriority)
 
bool IsAutoDelete () const
 
virtual void StopThread (bool bWait=true)
 
bool IsRunning () const
 
bool IsCurrentThread () const
 
int GetMinPriority (void)
 
int GetMaxPriority (void)
 
int GetNormalPriority (void)
 
int GetPriority (void)
 
bool SetPriority (const int iPriority)
 
bool WaitForThreadExit (unsigned int milliseconds)
 
float GetRelativeUsage ()
 
int64_t GetAbsoluteUsage ()
 
virtual void OnException ()
 

Additional Inherited Members

- Static Public Member Functions inherited from CThread
static bool IsCurrentThread (const ThreadIdentifier tid)
 
static ThreadIdentifier GetCurrentThreadId ()
 
static ThreadIdentifier GetDisplayThreadId (const ThreadIdentifier tid)
 
static CThreadGetCurrentThread ()
 
- Public Attributes inherited from IPlayer
std::string m_name
 
std::string m_type
 
- Protected Types inherited from CThread
enum  WaitResponse { WAIT_INTERRUPTED = -1 , WAIT_SIGNALED = 0 , WAIT_TIMEDOUT = 1 }
 
- Protected Member Functions inherited from CThread
 CThread (const char *ThreadName)
 
virtual void OnStartup ()
 
virtual void OnExit ()
 
WaitResponse AbortableWait (CEvent &event, int timeoutMillis=-1)
 
- Protected Attributes inherited from IPlayer
IPlayerCallbackm_callback
 
- Protected Attributes inherited from CThread
std::atomic< bool > m_bStop
 

Member Enumeration Documentation

◆ WARP_CURSOR

Enumerator
WARP_NONE 
WARP_TOP_LEFT 
WARP_TOP_RIGHT 
WARP_BOTTOM_RIGHT 
WARP_BOTTOM_LEFT 
WARP_CENTER 

Constructor & Destructor Documentation

◆ CExternalPlayer()

CExternalPlayer::CExternalPlayer ( IPlayerCallback callback)
explicit

◆ ~CExternalPlayer()

CExternalPlayer::~CExternalPlayer ( )
override

Member Function Documentation

◆ CanSeek()

bool CExternalPlayer::CanSeek ( )
overridevirtual

Reimplemented from IPlayer.

◆ CloseFile()

bool CExternalPlayer::CloseFile ( bool  reopen = false)
overridevirtual

Implements IPlayer.

◆ DoAudioWork()

void CExternalPlayer::DoAudioWork ( )
inlineoverridevirtual

Reimplemented from IPlayer.

◆ GetAVDelay()

float CExternalPlayer::GetAVDelay ( )
overridevirtual

Reimplemented from IPlayer.

◆ GetPlayerState()

std::string CExternalPlayer::GetPlayerState ( )
overridevirtual

Reimplemented from IPlayer.

◆ GetSubTitleDelay()

float CExternalPlayer::GetSubTitleDelay ( )
overridevirtual

Reimplemented from IPlayer.

◆ HasAudio()

bool CExternalPlayer::HasAudio ( ) const
overridevirtual

Implements IPlayer.

◆ HasVideo()

bool CExternalPlayer::HasVideo ( ) const
overridevirtual

Implements IPlayer.

◆ Initialize()

bool CExternalPlayer::Initialize ( TiXmlElement *  pConfig)
overridevirtual

Reimplemented from IPlayer.

◆ IsPlaying()

bool CExternalPlayer::IsPlaying ( ) const
overridevirtual

Reimplemented from IPlayer.

◆ OpenFile()

bool CExternalPlayer::OpenFile ( const CFileItem file,
const CPlayerOptions options 
)
overridevirtual

Reimplemented from IPlayer.

◆ Pause()

void CExternalPlayer::Pause ( )
overridevirtual

Implements IPlayer.

◆ Seek()

void CExternalPlayer::Seek ( bool  bPlus,
bool  bLargeStep,
bool  bChapterOverride 
)
overridevirtual

Implements IPlayer.

◆ SeekPercentage()

void CExternalPlayer::SeekPercentage ( float  iPercent)
overridevirtual

Reimplemented from IPlayer.

◆ SeekTime()

void CExternalPlayer::SeekTime ( int64_t  iTime)
overridevirtual

Reimplemented from IPlayer.

◆ SetAVDelay()

void CExternalPlayer::SetAVDelay ( float  fValue = 0.0f)
overridevirtual

Reimplemented from IPlayer.

◆ SetDynamicRangeCompression()

void CExternalPlayer::SetDynamicRangeCompression ( long  drc)
inlineoverridevirtual

Reimplemented from IPlayer.

◆ SetPlayerState()

bool CExternalPlayer::SetPlayerState ( const std::string &  state)
overridevirtual

Reimplemented from IPlayer.

◆ SetSpeed()

void CExternalPlayer::SetSpeed ( float  speed)
overridevirtual

Implements IPlayer.

◆ SetSubTitleDelay()

void CExternalPlayer::SetSubTitleDelay ( float  fValue = 0.0f)
overridevirtual

Reimplemented from IPlayer.

◆ SetVolume()

void CExternalPlayer::SetVolume ( float  volume)
inlineoverridevirtual

Reimplemented from IPlayer.


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