OpenShot Library | libopenshot  0.3.3
Public Member Functions | Protected Attributes | List of all members
openshot::PlayerBase Class Referenceabstract

This is the base class of all Players in libopenshot. More...

#include <PlayerBase.h>

Inheritance diagram for openshot::PlayerBase:
[legend]
Collaboration diagram for openshot::PlayerBase:
[legend]

Public Member Functions

virtual void Loading ()=0
 Display a loading animation. More...
 
virtual PlaybackMode Mode ()=0
 Get the current mode. More...
 
virtual void Pause ()=0
 Pause the video. More...
 
virtual void Play ()=0
 Play the video. More...
 
virtual int64_t Position ()=0
 Get the current frame number being played. More...
 
virtual openshot::ReaderBaseReader ()=0
 Get the current reader, such as a FFmpegReader. More...
 
virtual void Reader (openshot::ReaderBase *new_reader)=0
 Set the current reader, such as a FFmpegReader. More...
 
virtual void Seek (int64_t new_frame)=0
 Seek to a specific frame in the player. More...
 
virtual float Speed ()=0
 Get the Playback speed. More...
 
virtual void Speed (float new_speed)=0
 Set the Playback speed (1.0 = normal speed, <1.0 = slower, >1.0 faster) More...
 
virtual void Stop ()=0
 Stop the video player and clear the cached frames. More...
 
virtual float Volume ()=0
 Get the Volume. More...
 
virtual void Volume (float new_volume)=0
 Set the Volume (1.0 = normal volume, <1.0 = quieter, >1.0 louder) More...
 
virtual ~PlayerBase ()=default
 

Protected Attributes

PlaybackMode mode
 
openshot::ReaderBasereader
 
float speed
 
float volume
 

Detailed Description

This is the base class of all Players in libopenshot.

Players are responsible for displaying images and playing back audio samples with specific frame rates and sample rates. All Players must be based on this class, and include these methods.

Definition at line 41 of file PlayerBase.h.

Constructor & Destructor Documentation

◆ ~PlayerBase()

virtual openshot::PlayerBase::~PlayerBase ( )
virtualdefault

Member Function Documentation

◆ Loading()

void PlayerBase::Loading ( )
pure virtual

Display a loading animation.

Implemented in openshot::QtPlayer.

Definition at line 18 of file PlayerBase.cpp.

◆ Mode()

virtual PlaybackMode openshot::PlayerBase::Mode ( )
pure virtual

Get the current mode.

Implemented in openshot::QtPlayer.

◆ Pause()

void PlayerBase::Pause ( )
pure virtual

Pause the video.

Implemented in openshot::QtPlayer.

Definition at line 28 of file PlayerBase.cpp.

◆ Play()

void PlayerBase::Play ( )
pure virtual

Play the video.

Implemented in openshot::QtPlayer.

Definition at line 23 of file PlayerBase.cpp.

◆ Position()

virtual int64_t openshot::PlayerBase::Position ( )
pure virtual

Get the current frame number being played.

Implemented in openshot::QtPlayer.

◆ Reader() [1/2]

openshot::ReaderBase * PlayerBase::Reader ( )
pure virtual

Get the current reader, such as a FFmpegReader.

Implemented in openshot::QtPlayer.

Definition at line 48 of file PlayerBase.cpp.

◆ Reader() [2/2]

void PlayerBase::Reader ( openshot::ReaderBase new_reader)
pure virtual

Set the current reader, such as a FFmpegReader.

Implemented in openshot::QtPlayer.

Definition at line 53 of file PlayerBase.cpp.

◆ Seek()

virtual void openshot::PlayerBase::Seek ( int64_t  new_frame)
pure virtual

Seek to a specific frame in the player.

Implemented in openshot::QtPlayer.

◆ Speed() [1/2]

float PlayerBase::Speed ( )
pure virtual

Get the Playback speed.

Implemented in openshot::QtPlayer.

Definition at line 33 of file PlayerBase.cpp.

◆ Speed() [2/2]

void PlayerBase::Speed ( float  new_speed)
pure virtual

Set the Playback speed (1.0 = normal speed, <1.0 = slower, >1.0 faster)

Implemented in openshot::QtPlayer.

Definition at line 38 of file PlayerBase.cpp.

◆ Stop()

void PlayerBase::Stop ( )
pure virtual

Stop the video player and clear the cached frames.

Implemented in openshot::QtPlayer.

Definition at line 43 of file PlayerBase.cpp.

◆ Volume() [1/2]

float PlayerBase::Volume ( )
pure virtual

Get the Volume.

Implemented in openshot::QtPlayer.

Definition at line 58 of file PlayerBase.cpp.

◆ Volume() [2/2]

void PlayerBase::Volume ( float  new_volume)
pure virtual

Set the Volume (1.0 = normal volume, <1.0 = quieter, >1.0 louder)

Implemented in openshot::QtPlayer.

Definition at line 63 of file PlayerBase.cpp.

Member Data Documentation

◆ mode

PlaybackMode openshot::PlayerBase::mode
protected

◆ reader

openshot::ReaderBase* openshot::PlayerBase::reader
protected

◆ speed

float openshot::PlayerBase::speed
protected

Definition at line 44 of file PlayerBase.h.

Referenced by Speed(), and openshot::QtPlayer::Speed().

◆ volume

float openshot::PlayerBase::volume
protected

Definition at line 45 of file PlayerBase.h.

Referenced by Volume(), and openshot::QtPlayer::Volume().


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