OpenShot Library | libopenshot  0.3.2
PlayerPrivate.h
Go to the documentation of this file.
1 
10 // Copyright (c) 2008-2019 OpenShot Studios, LLC
11 //
12 // SPDX-License-Identifier: LGPL-3.0-or-later
13 
14 #ifndef OPENSHOT_PLAYER_PRIVATE_H
15 #define OPENSHOT_PLAYER_PRIVATE_H
16 
17 #include "../ReaderBase.h"
18 #include "../RendererBase.h"
19 #include "../AudioReaderSource.h"
20 #include "../Qt/AudioPlaybackThread.h"
21 #include "../Qt/VideoPlaybackThread.h"
22 #include "../Qt/VideoCacheThread.h"
23 
24 namespace openshot
25 {
30  class PlayerPrivate : juce::Thread
31  {
32  std::shared_ptr<openshot::Frame> frame;
33  int64_t playback_frames;
34  int64_t video_position;
35  int64_t audio_position;
36  openshot::ReaderBase *reader;
37  openshot::AudioPlaybackThread *audioPlayback;
38  openshot::VideoPlaybackThread *videoPlayback;
39  openshot::VideoCacheThread *videoCache;
40  int speed;
41  int last_speed;
42  openshot::RendererBase *renderer;
43  int64_t last_video_position;
44  int max_sleep_ms;
45  bool is_dirty;
46 
50  virtual ~PlayerPrivate();
51 
53  void run();
54 
56  bool startPlayback();
57 
59  void Seek(int64_t new_position);
60 
62  void stopPlayback();
63 
65  std::shared_ptr<openshot::Frame> getFrame();
66 
68  friend class QtPlayer;
69  };
70 
71 }
72 
73 #endif // OPENSHOT_PLAYER_PRIVATE_H
openshot::VideoPlaybackThread
The video playback class.
Definition: VideoPlaybackThread.h:30
openshot
This namespace is the default namespace for all code in the openshot library.
Definition: Compressor.h:28
openshot::AudioPlaybackThread
The audio playback thread.
Definition: AudioPlaybackThread.h:77
openshot::VideoCacheThread
The video cache class.
Definition: VideoCacheThread.h:29
openshot::PlayerPrivate
The private part of QtPlayer class, which contains an audio thread and video thread,...
Definition: PlayerPrivate.h:30
openshot::QtPlayer
This class is used to playback a video from a reader.
Definition: QtPlayer.h:32
openshot::RendererBase
This is the base class of all Renderers in libopenshot.
Definition: RendererBase.h:30
openshot::ReaderBase
This abstract class is the base class, used by all readers in libopenshot.
Definition: ReaderBase.h:75