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

#include <VideoPlayerVideo.h>

Inheritance diagram for CVideoPlayerVideo:
CThread IDVDStreamPlayerVideo IDVDStreamPlayer

Public Member Functions

 CVideoPlayerVideo (CDVDClock *pClock, CDVDOverlayContainer *pOverlayContainer, CDVDMessageQueue &parent, CRenderManager &renderManager, CProcessInfo &processInfo)
 
 ~CVideoPlayerVideo () override
 
bool OpenStream (CDVDStreamInfo hint) override
 
void CloseStream (bool bWaitForBuffers) override
 
void Flush (bool sync) override
 
bool AcceptsData () const override
 
bool HasData () const override
 
bool IsInited () const override
 
void SendMessage (CDVDMsg *pMsg, int priority=0) override
 
void FlushMessages () override
 
void EnableSubtitle (bool bEnable) override
 
bool IsSubtitleEnabled () override
 
double GetSubtitleDelay () override
 
void SetSubtitleDelay (double delay) override
 
bool IsStalled () const override
 
bool IsRewindStalled () const override
 
double GetCurrentPts () override
 
double GetOutputDelay () override
 
std::string GetPlayerInfo () override
 
int GetVideoBitrate () override
 
void SetSpeed (int iSpeed) override
 
- 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 ()
 
- Public Member Functions inherited from IDVDStreamPlayerVideo
 IDVDStreamPlayerVideo (CProcessInfo &processInfo)
 
 ~IDVDStreamPlayerVideo () override=default
 
virtual bool IsEOS ()
 
- Public Member Functions inherited from IDVDStreamPlayer
 IDVDStreamPlayer (CProcessInfo &processInfo)
 
virtual ~IDVDStreamPlayer ()=default
 

Public Attributes

CDVDOverlayContainerm_pOverlayContainer
 
CDVDClockm_pClock
 

Protected Types

enum  EOutputState { OUTPUT_NORMAL , OUTPUT_ABORT , OUTPUT_DROPPED , OUTPUT_AGAIN }
 
- Protected Types inherited from CThread
enum  WaitResponse { WAIT_INTERRUPTED = -1 , WAIT_SIGNALED = 0 , WAIT_TIMEDOUT = 1 }
 

Protected Member Functions

void OnExit () override
 
void Process () override
 
bool ProcessDecoderOutput (double &frametime, double &pts)
 
void SendMessageBack (CDVDMsg *pMsg, int priority=0)
 
MsgQueueReturnCode GetMessage (CDVDMsg **pMsg, unsigned int iTimeoutInMilliSeconds, int &priority)
 
EOutputState OutputPicture (const VideoPicture *src)
 
void ProcessOverlays (const VideoPicture *pSource, double pts)
 
void OpenStream (CDVDStreamInfo &hint, CDVDVideoCodec *codec)
 
void ResetFrameRateCalc ()
 
void CalcFrameRate ()
 
int CalcDropRequirement (double pts)
 
- Protected Member Functions inherited from CThread
 CThread (const char *ThreadName)
 
virtual void OnStartup ()
 
WaitResponse AbortableWait (CEvent &event, int timeoutMillis=-1)
 

Protected Attributes

double m_iSubtitleDelay
 
int m_iLateFrames
 
int m_iDroppedFrames
 
int m_iDroppedRequest
 
double m_fFrameRate
 
double m_fStableFrameRate
 
int m_iFrameRateCount
 
bool m_bAllowDrop
 
int m_iFrameRateErr
 
int m_iFrameRateLength
 
bool m_bFpsInvalid
 
bool m_bRenderSubs
 
float m_fForcedAspectRatio
 
int m_speed
 
std::atomic_bool m_stalled
 
std::atomic_bool m_rewindStalled
 
bool m_paused
 
IDVDStreamPlayer::ESyncState m_syncState
 
std::atomic_bool m_bAbortOutput
 
BitstreamStats m_videoStats
 
CDVDMessageQueue m_messageQueue
 
CDVDMessageQueuem_messageParent
 
CDVDStreamInfo m_hints
 
CDVDVideoCodecm_pVideoCodec
 
CPtsTracker m_ptsTracker
 
std::list< DVDMessageListItemm_packets
 
CDroppingStats m_droppingStats
 
CRenderManagerm_renderManager
 
VideoPicture m_picture
 
EOutputState m_outputSate
 
- Protected Attributes inherited from CThread
std::atomic< bool > m_bStop
 
- Protected Attributes inherited from IDVDStreamPlayer
CProcessInfom_processInfo
 

Additional Inherited Members

- Public Types inherited from IDVDStreamPlayer
enum  ESyncState { SYNC_STARTING , SYNC_WAITSYNC , SYNC_INSYNC }
 
- Static Public Member Functions inherited from CThread
static bool IsCurrentThread (const ThreadIdentifier tid)
 
static ThreadIdentifier GetCurrentThreadId ()
 
static ThreadIdentifier GetDisplayThreadId (const ThreadIdentifier tid)
 
static CThreadGetCurrentThread ()
 

Member Enumeration Documentation

◆ EOutputState

Enumerator
OUTPUT_NORMAL 
OUTPUT_ABORT 
OUTPUT_DROPPED 
OUTPUT_AGAIN 

Constructor & Destructor Documentation

◆ CVideoPlayerVideo()

CVideoPlayerVideo::CVideoPlayerVideo ( CDVDClock pClock,
CDVDOverlayContainer pOverlayContainer,
CDVDMessageQueue parent,
CRenderManager renderManager,
CProcessInfo processInfo 
)

◆ ~CVideoPlayerVideo()

CVideoPlayerVideo::~CVideoPlayerVideo ( )
override

Member Function Documentation

◆ AcceptsData()

bool CVideoPlayerVideo::AcceptsData ( ) const
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ CalcDropRequirement()

int CVideoPlayerVideo::CalcDropRequirement ( double  pts)
protected

◆ CalcFrameRate()

void CVideoPlayerVideo::CalcFrameRate ( )
protected

◆ CloseStream()

void CVideoPlayerVideo::CloseStream ( bool  bWaitForBuffers)
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ EnableSubtitle()

void CVideoPlayerVideo::EnableSubtitle ( bool  bEnable)
inlineoverridevirtual

Implements IDVDStreamPlayerVideo.

◆ Flush()

void CVideoPlayerVideo::Flush ( bool  sync)
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ FlushMessages()

void CVideoPlayerVideo::FlushMessages ( )
inlineoverridevirtual

Implements IDVDStreamPlayer.

◆ GetCurrentPts()

double CVideoPlayerVideo::GetCurrentPts ( )
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ GetMessage()

MsgQueueReturnCode CVideoPlayerVideo::GetMessage ( CDVDMsg **  pMsg,
unsigned int  iTimeoutInMilliSeconds,
int &  priority 
)
inlineprotected

◆ GetOutputDelay()

double CVideoPlayerVideo::GetOutputDelay ( )
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ GetPlayerInfo()

std::string CVideoPlayerVideo::GetPlayerInfo ( )
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ GetSubtitleDelay()

double CVideoPlayerVideo::GetSubtitleDelay ( )
inlineoverridevirtual

Implements IDVDStreamPlayerVideo.

◆ GetVideoBitrate()

int CVideoPlayerVideo::GetVideoBitrate ( )
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ HasData()

bool CVideoPlayerVideo::HasData ( ) const
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ IsInited()

bool CVideoPlayerVideo::IsInited ( ) const
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ IsRewindStalled()

bool CVideoPlayerVideo::IsRewindStalled ( ) const
inlineoverridevirtual

Reimplemented from IDVDStreamPlayerVideo.

◆ IsStalled()

bool CVideoPlayerVideo::IsStalled ( ) const
inlineoverridevirtual

Implements IDVDStreamPlayerVideo.

◆ IsSubtitleEnabled()

bool CVideoPlayerVideo::IsSubtitleEnabled ( )
inlineoverridevirtual

Implements IDVDStreamPlayerVideo.

◆ OnExit()

void CVideoPlayerVideo::OnExit ( )
overrideprotectedvirtual

Reimplemented from CThread.

◆ OpenStream() [1/2]

void CVideoPlayerVideo::OpenStream ( CDVDStreamInfo hint,
CDVDVideoCodec codec 
)
protected

◆ OpenStream() [2/2]

bool CVideoPlayerVideo::OpenStream ( CDVDStreamInfo  hint)
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ OutputPicture()

CVideoPlayerVideo::EOutputState CVideoPlayerVideo::OutputPicture ( const VideoPicture src)
protected

◆ Process()

void CVideoPlayerVideo::Process ( void  )
overrideprotectedvirtual
Todo:
this needs to be set on a streamchange instead

Reimplemented from CThread.

◆ ProcessDecoderOutput()

bool CVideoPlayerVideo::ProcessDecoderOutput ( double &  frametime,
double &  pts 
)
protected
Todo:
implement
Todo:
implement

◆ ProcessOverlays()

void CVideoPlayerVideo::ProcessOverlays ( const VideoPicture pSource,
double  pts 
)
protected

◆ ResetFrameRateCalc()

void CVideoPlayerVideo::ResetFrameRateCalc ( )
protected

◆ SendMessage()

void CVideoPlayerVideo::SendMessage ( CDVDMsg pMsg,
int  priority = 0 
)
inlineoverridevirtual

Implements IDVDStreamPlayerVideo.

◆ SendMessageBack()

void CVideoPlayerVideo::SendMessageBack ( CDVDMsg pMsg,
int  priority = 0 
)
inlineprotected

◆ SetSpeed()

void CVideoPlayerVideo::SetSpeed ( int  iSpeed)
overridevirtual

Implements IDVDStreamPlayerVideo.

◆ SetSubtitleDelay()

void CVideoPlayerVideo::SetSubtitleDelay ( double  delay)
inlineoverridevirtual

Implements IDVDStreamPlayerVideo.

Member Data Documentation

◆ m_bAbortOutput

std::atomic_bool CVideoPlayerVideo::m_bAbortOutput
protected

◆ m_bAllowDrop

bool CVideoPlayerVideo::m_bAllowDrop
protected

◆ m_bFpsInvalid

bool CVideoPlayerVideo::m_bFpsInvalid
protected

◆ m_bRenderSubs

bool CVideoPlayerVideo::m_bRenderSubs
protected

◆ m_droppingStats

CDroppingStats CVideoPlayerVideo::m_droppingStats
protected

◆ m_fForcedAspectRatio

float CVideoPlayerVideo::m_fForcedAspectRatio
protected

◆ m_fFrameRate

double CVideoPlayerVideo::m_fFrameRate
protected

◆ m_fStableFrameRate

double CVideoPlayerVideo::m_fStableFrameRate
protected

◆ m_hints

CDVDStreamInfo CVideoPlayerVideo::m_hints
protected

◆ m_iDroppedFrames

int CVideoPlayerVideo::m_iDroppedFrames
protected

◆ m_iDroppedRequest

int CVideoPlayerVideo::m_iDroppedRequest
protected

◆ m_iFrameRateCount

int CVideoPlayerVideo::m_iFrameRateCount
protected

◆ m_iFrameRateErr

int CVideoPlayerVideo::m_iFrameRateErr
protected

◆ m_iFrameRateLength

int CVideoPlayerVideo::m_iFrameRateLength
protected

◆ m_iLateFrames

int CVideoPlayerVideo::m_iLateFrames
protected

◆ m_iSubtitleDelay

double CVideoPlayerVideo::m_iSubtitleDelay
protected

◆ m_messageParent

CDVDMessageQueue& CVideoPlayerVideo::m_messageParent
protected

◆ m_messageQueue

CDVDMessageQueue CVideoPlayerVideo::m_messageQueue
protected

◆ m_outputSate

EOutputState CVideoPlayerVideo::m_outputSate
protected

◆ m_packets

std::list<DVDMessageListItem> CVideoPlayerVideo::m_packets
protected

◆ m_paused

bool CVideoPlayerVideo::m_paused
protected

◆ m_pClock

CDVDClock* CVideoPlayerVideo::m_pClock

◆ m_picture

VideoPicture CVideoPlayerVideo::m_picture
protected

◆ m_pOverlayContainer

CDVDOverlayContainer* CVideoPlayerVideo::m_pOverlayContainer

◆ m_ptsTracker

CPtsTracker CVideoPlayerVideo::m_ptsTracker
protected

◆ m_pVideoCodec

CDVDVideoCodec* CVideoPlayerVideo::m_pVideoCodec
protected

◆ m_renderManager

CRenderManager& CVideoPlayerVideo::m_renderManager
protected

◆ m_rewindStalled

std::atomic_bool CVideoPlayerVideo::m_rewindStalled
protected

◆ m_speed

int CVideoPlayerVideo::m_speed
protected

◆ m_stalled

std::atomic_bool CVideoPlayerVideo::m_stalled
protected

◆ m_syncState

IDVDStreamPlayer::ESyncState CVideoPlayerVideo::m_syncState
protected

◆ m_videoStats

BitstreamStats CVideoPlayerVideo::m_videoStats
protected

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