Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
Scheduler Class Reference

#include <evrcustompresenter_p.h>

+ Collaboration diagram for Scheduler:

Public Types

enum  ScheduleEvent { Terminate = WM_USER , Schedule = WM_USER + 1 , Flush = WM_USER + 2 }
 

Public Member Functions

 Scheduler (EVRCustomPresenter *presenter)
 
 ~Scheduler ()
 
void setFrameRate (const MFRatio &fps)
 
void setClockRate (float rate)
 
const LONGLONG & lastSampleTime () const
 
const LONGLONG & frameDuration () const
 
HRESULT startScheduler (IMFClock *clock)
 
HRESULT stopScheduler ()
 
HRESULT scheduleSample (IMFSample *sample, bool presentNow)
 
HRESULT processSamplesInQueue (LONG *nextSleep)
 
HRESULT processSample (IMFSample *sample, LONG *nextSleep)
 
HRESULT flush ()
 
bool areSamplesScheduled ()
 

Static Public Member Functions

static DWORD WINAPI schedulerThreadProc (LPVOID parameter)
 

Detailed Description

Definition at line 94 of file evrcustompresenter_p.h.

Member Enumeration Documentation

◆ ScheduleEvent

Enumerator
Terminate 
Schedule 
Flush 

Definition at line 98 of file evrcustompresenter_p.h.

Constructor & Destructor Documentation

◆ Scheduler()

Scheduler::Scheduler ( EVRCustomPresenter presenter)

Definition at line 84 of file evrcustompresenter.cpp.

◆ ~Scheduler()

Scheduler::~Scheduler ( )

Definition at line 98 of file evrcustompresenter.cpp.

References QList< T >::clear(), i, qt_evr_safe_release(), and QList< T >::size().

+ Here is the call graph for this function:

Member Function Documentation

◆ areSamplesScheduled()

bool Scheduler::areSamplesScheduled ( )

Definition at line 230 of file evrcustompresenter.cpp.

References QList< T >::count().

+ Here is the call graph for this function:

◆ flush()

HRESULT Scheduler::flush ( )

Definition at line 214 of file evrcustompresenter.cpp.

References Flush, and SCHEDULER_TIMEOUT.

Referenced by EVRCustomPresenter::~EVRCustomPresenter().

+ Here is the caller graph for this function:

◆ frameDuration()

const LONGLONG & Scheduler::frameDuration ( ) const
inline

Definition at line 112 of file evrcustompresenter_p.h.

◆ lastSampleTime()

const LONGLONG & Scheduler::lastSampleTime ( ) const
inline

Definition at line 111 of file evrcustompresenter_p.h.

◆ processSample()

HRESULT Scheduler::processSample ( IMFSample *  sample,
LONG *  nextSleep 
)

Definition at line 297 of file evrcustompresenter.cpp.

References QMutex::lock(), MFTimeToMsec(), QList< T >::prepend(), EVRCustomPresenter::presentSample(), qFabs(), and QMutex::unlock().

Referenced by processSamplesInQueue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processSamplesInQueue()

HRESULT Scheduler::processSamplesInQueue ( LONG *  nextSleep)

Definition at line 264 of file evrcustompresenter.cpp.

References QQueue< T >::dequeue(), QList< T >::isEmpty(), QMutex::lock(), processSample(), qt_evr_safe_release(), and QMutex::unlock().

+ Here is the call graph for this function:

◆ schedulerThreadProc()

DWORD WINAPI Scheduler::schedulerThreadProc ( LPVOID  parameter)
static

Definition at line 359 of file evrcustompresenter.cpp.

Referenced by startScheduler().

+ Here is the caller graph for this function:

◆ scheduleSample()

HRESULT Scheduler::scheduleSample ( IMFSample *  sample,
bool  presentNow 
)

Definition at line 236 of file evrcustompresenter.cpp.

References QQueue< T >::enqueue(), QMutex::lock(), EVRCustomPresenter::presentSample(), Schedule, and QMutex::unlock().

+ Here is the call graph for this function:

◆ setClockRate()

void Scheduler::setClockRate ( float  rate)
inline

Definition at line 109 of file evrcustompresenter_p.h.

Referenced by EVRCustomPresenter::OnClockSetRate().

+ Here is the caller graph for this function:

◆ setFrameRate()

void Scheduler::setFrameRate ( const MFRatio &  fps)

Definition at line 106 of file evrcustompresenter.cpp.

◆ startScheduler()

HRESULT Scheduler::startScheduler ( IMFClock *  clock)

Definition at line 119 of file evrcustompresenter.cpp.

References done, and schedulerThreadProc().

+ Here is the call graph for this function:

◆ stopScheduler()

HRESULT Scheduler::stopScheduler ( )

Definition at line 183 of file evrcustompresenter.cpp.

References QList< T >::clear(), i, QMutex::lock(), QList< T >::size(), Terminate, and QMutex::unlock().

Referenced by EVRCustomPresenter::~EVRCustomPresenter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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