Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
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, double messageQueueTimeSize)
 
 ~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 (std::shared_ptr< 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)
 
template<typename Rep , typename Period >
void Sleep (std::chrono::duration< Rep, Period > duration)
 
bool IsAutoDelete () const
 
virtual void StopThread (bool bWait=true)
 
bool IsRunning () const
 
bool IsCurrentThread () const
 
bool Join (std::chrono::milliseconds duration)
 
bool SetPriority (const ThreadPriority &priority)
 Set the threads priority. This uses the platforms native threading library to do so.
 
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 (const std::shared_ptr< CDVDMsg > &pMsg, int priority=0)
 
MsgQueueReturnCode GetMessage (std::shared_ptr< CDVDMsg > &pMsg, std::chrono::milliseconds timeout, int &priority)
 
EOutputState OutputPicture (const VideoPicture *src)
 
void ProcessOverlays (const VideoPicture *pSource, double pts)
 
void OpenStream (CDVDStreamInfo &hint, std::unique_ptr< 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, std::chrono::milliseconds duration=std::chrono::milliseconds(-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 = false
 
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
 
std::unique_ptr< CDVDVideoCodecm_pVideoCodec
 
CPtsTracker m_ptsTracker
 
std::list< DVDMessageListItemm_packets
 
CDroppingStats m_droppingStats
 
CRenderManagerm_renderManager
 
VideoPicture m_picture
 
EOutputState m_outputSate {OUTPUT_NORMAL}
 
- Protected Attributes inherited from CThread
std::atomic< boolm_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 const std::thread::id GetCurrentThreadId ()
 
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,
double messageQueueTimeSize )

◆ ~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 ( std::shared_ptr< CDVDMsg > & pMsg,
std::chrono::milliseconds timeout,
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,
std::unique_ptr< 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 ( std::shared_ptr< CDVDMsg > pMsg,
int priority = 0 )
inlineoverridevirtual

Implements IDVDStreamPlayerVideo.

◆ SendMessageBack()

void CVideoPlayerVideo::SendMessageBack ( const std::shared_ptr< 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 {OUTPUT_NORMAL}
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

std::unique_ptr<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 = false
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: