Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QFFmpeg::TimeController Class Reference

#include <qffmpegtimecontroller_p.h>

+ Collaboration diagram for QFFmpeg::TimeController:

Public Types

using Clock = std::chrono::steady_clock
 
using TimePoint = Clock::time_point
 
using PlaybackRate = float
 

Public Member Functions

 TimeController ()
 
float playbackRate () const
 
void setPlaybackRate (PlaybackRate playbackRate)
 
void sync (qint64 trackPos=0)
 
void sync (const TimePoint &tp, qint64 pos)
 
void syncSoft (const TimePoint &tp, qint64 pos, const Clock::duration &fixingTime=std::chrono::seconds(4))
 
qint64 currentPosition (const Clock::duration &offset=Clock::duration{ 0 }) const
 
void setPaused (bool paused)
 
qint64 positionFromTime (TimePoint tp, bool ignorePause=false) const
 
TimePoint timeFromPosition (qint64 pos, bool ignorePause=false) const
 

Detailed Description

Definition at line 26 of file qffmpegtimecontroller_p.h.

Member Typedef Documentation

◆ Clock

using QFFmpeg::TimeController::Clock = std::chrono::steady_clock

Definition at line 31 of file qffmpegtimecontroller_p.h.

◆ PlaybackRate

Definition at line 33 of file qffmpegtimecontroller_p.h.

◆ TimePoint

using QFFmpeg::TimeController::TimePoint = Clock::time_point

Definition at line 32 of file qffmpegtimecontroller_p.h.

Constructor & Destructor Documentation

◆ TimeController()

QFFmpeg::TimeController::TimeController ( )

Definition at line 15 of file qffmpegtimecontroller.cpp.

References sync().

+ Here is the call graph for this function:

Member Function Documentation

◆ currentPosition()

qint64 QFFmpeg::TimeController::currentPosition ( const Clock::duration &  offset = Clock::duration{ 0 }) const

Definition at line 64 of file qffmpegtimecontroller.cpp.

References positionFromTime().

Referenced by QFFmpeg::PlaybackEngine::currentPosition().

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

◆ playbackRate()

float QFFmpeg::TimeController::playbackRate ( ) const

Definition at line 20 of file qffmpegtimecontroller.cpp.

Referenced by QFFmpeg::Renderer::playbackRate(), QFFmpeg::PlaybackEngine::playbackRate(), and setPlaybackRate().

+ Here is the caller graph for this function:

◆ positionFromTime()

qint64 QFFmpeg::TimeController::positionFromTime ( TimePoint  tp,
bool  ignorePause = false 
) const

Definition at line 78 of file qffmpegtimecontroller.cpp.

Referenced by QFFmpeg::Renderer::changeRendererTime(), currentPosition(), and syncSoft().

+ Here is the caller graph for this function:

◆ setPaused()

void QFFmpeg::TimeController::setPaused ( bool  paused)

Definition at line 69 of file qffmpegtimecontroller.cpp.

Referenced by QFFmpeg::Renderer::onPauseChanged(), and QFFmpeg::PlaybackEngine::seek().

+ Here is the caller graph for this function:

◆ setPlaybackRate()

void QFFmpeg::TimeController::setPlaybackRate ( PlaybackRate  playbackRate)

Definition at line 25 of file qffmpegtimecontroller.cpp.

References playbackRate(), and Q_ASSERT.

Referenced by QFFmpeg::Renderer::setPlaybackRate(), and QFFmpeg::PlaybackEngine::setPlaybackRate().

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

◆ sync() [1/2]

void QFFmpeg::TimeController::sync ( const TimePoint tp,
qint64  pos 
)

Definition at line 45 of file qffmpegtimecontroller.cpp.

References pos.

◆ sync() [2/2]

void QFFmpeg::TimeController::sync ( qint64  trackPos = 0)

Definition at line 40 of file qffmpegtimecontroller.cpp.

References sync().

Referenced by TimeController(), QFFmpeg::Renderer::changeRendererTime(), QFFmpeg::PlaybackEngine::seek(), and sync().

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

◆ syncSoft()

void QFFmpeg::TimeController::syncSoft ( const TimePoint tp,
qint64  pos,
const Clock::duration &  fixingTime = std::chrono::seconds(4) 
)

Definition at line 52 of file qffmpegtimecontroller.cpp.

References pos, and positionFromTime().

Referenced by QFFmpeg::Renderer::syncSoft().

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

◆ timeFromPosition()

TimeController::TimePoint QFFmpeg::TimeController::timeFromPosition ( qint64  pos,
bool  ignorePause = false 
) const

Definition at line 94 of file qffmpegtimecontroller.cpp.

References pos, and position().

Referenced by QFFmpeg::Renderer::frameDelay(), and QFFmpeg::Renderer::timerInterval().

+ 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: