OpenShot Library | libopenshot 0.3.3
Loading...
Searching...
No Matches
PlayerBase.h
Go to the documentation of this file.
1
9// Copyright (c) 2008-2019 OpenShot Studios, LLC
10//
11// SPDX-License-Identifier: LGPL-3.0-or-later
12
13#ifndef OPENSHOT_PLAYER_BASE_H
14#define OPENSHOT_PLAYER_BASE_H
15
16#include <iostream>
17#include "ReaderBase.h"
18
19namespace openshot
20{
33
42 {
43 protected:
44 float speed;
45 float volume;
48
49 public:
50
52 virtual void Loading() = 0;
53
55 virtual PlaybackMode Mode() = 0;
56
58 virtual void Play() = 0;
59
61 virtual void Pause() = 0;
62
64 virtual int64_t Position() = 0;
65
67 virtual void Seek(int64_t new_frame) = 0;
68
70 virtual float Speed() = 0;
71
73 virtual void Speed(float new_speed) = 0;
74
76 virtual void Stop() = 0;
77
79 virtual openshot::ReaderBase* Reader() = 0;
80
82 virtual void Reader(openshot::ReaderBase *new_reader) = 0;
83
85 virtual float Volume() = 0;
86
88 virtual void Volume(float new_volume) = 0;
89
90 virtual ~PlayerBase() = default;
91 };
92
93}
94
95#endif
Header file for ReaderBase class.
This is the base class of all Players in libopenshot.
Definition PlayerBase.h:42
virtual void Stop()=0
Stop the video player and clear the cached frames.
virtual float Speed()=0
Get the Playback speed.
virtual void Play()=0
Play the video.
PlaybackMode mode
Definition PlayerBase.h:47
virtual float Volume()=0
Get the Volume.
virtual void Pause()=0
Pause the video.
virtual ~PlayerBase()=default
openshot::ReaderBase * reader
Definition PlayerBase.h:46
virtual int64_t Position()=0
Get the current frame number being played.
virtual void Seek(int64_t new_frame)=0
Seek to a specific frame in the player.
virtual PlaybackMode Mode()=0
Get the current mode.
virtual void Loading()=0
Display a loading animation.
virtual openshot::ReaderBase * Reader()=0
Get the current reader, such as a FFmpegReader.
This abstract class is the base class, used by all readers in libopenshot.
Definition ReaderBase.h:76
This namespace is the default namespace for all code in the openshot library.
Definition Compressor.h:29
PlaybackMode
This enumeration determines the mode of the video player (i.e. playing, paused, etc....
Definition PlayerBase.h:27
@ PLAYBACK_LOADING
Loading the video (display a loading animation)
Definition PlayerBase.h:30
@ PLAYBACK_PAUSED
Pause the video (holding the last displayed frame)
Definition PlayerBase.h:29
@ PLAYBACK_STOPPED
Stop playing the video (clear cache, done with player)
Definition PlayerBase.h:31
@ PLAYBACK_PLAY
Play the video normally.
Definition PlayerBase.h:28