Loading...
Searching...
No Matches
openshot::PlayerBase Class Referenceabstract

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

`#include <PlayerBase.h>`

Inheritance diagram for openshot::PlayerBase:

## Public Member Functions

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

## Protected Attributes

PlaybackMode | mode
openshot::ReaderBase * | reader
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 | ( |  | ) |

virtual default

## 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

Definition at line 47 of file PlayerBase.h.

Referenced by openshot::QtPlayer::Loading(), Loading(), openshot::QtPlayer::Mode(), openshot::QtPlayer::Pause(), Pause(), openshot::QtPlayer::Play(), Play(), openshot::QtPlayer::Stop(), Stop(), and openshot::QtPlayer::~QtPlayer().

## reader

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

protected

Definition at line 46 of file PlayerBase.h.

Referenced by openshot::QtPlayer::GetDefaultSampleRate(), openshot::QtPlayer::GetError(), openshot::QtPlayer::Play(), openshot::QtPlayer::QtPlayer(), openshot::QtPlayer::Reader(), Reader(), openshot::QtPlayer::Reader(), Reader(), openshot::QtPlayer::Seek(), openshot::QtPlayer::SetSource(), openshot::QtPlayer::SetTimelineSource(), and openshot::QtPlayer::Stop().

## speed

float openshot::PlayerBase::speed

protected

Definition at line 44 of file PlayerBase.h.

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

## volume

float openshot::PlayerBase::volume

protected

Definition at line 45 of file PlayerBase.h.

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

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

- PlayerBase.h
- PlayerBase.cpp