OpenShot Library | libopenshot
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
PlayerPrivate.h
Go to the documentation of this file.
1
9
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
#include <atomic>
24
#include <mutex>
25
26
namespace
openshot
27
{
32
class
PlayerPrivate : juce::Thread
33
{
34
std::shared_ptr<openshot::Frame> frame;
35
std::mutex frame_mutex;
36
std::atomic<uint64_t> seek_generation{0};
37
int64_t playback_frames;
38
std::atomic<int64_t> video_position;
39
int64_t audio_position;
40
openshot::ReaderBase
*reader;
41
openshot::AudioPlaybackThread
*audioPlayback;
42
openshot::VideoPlaybackThread
*videoPlayback;
43
openshot::VideoCacheThread
*videoCache;
44
std::atomic<int> speed;
45
int
last_speed;
46
openshot::RendererBase
*renderer;
47
std::atomic<int64_t> last_video_position;
48
int
max_sleep_ms;
49
std::atomic<bool> is_dirty;
50
52
PlayerPrivate(
openshot::RendererBase
*rb);
54
virtual
~PlayerPrivate();
55
57
void
run();
58
60
bool
startPlayback();
61
63
void
Seek(int64_t new_position);
64
66
void
stopPlayback();
67
69
std::shared_ptr<openshot::Frame> getFrame();
70
72
friend
struct
AudioPlaybackThreadTestAccess
;
73
friend
class
QtPlayer
;
74
};
75
76
}
77
78
#endif
// OPENSHOT_PLAYER_PRIVATE_H
AudioPlaybackThread.h
Source file for AudioPlaybackThread class.
AudioReaderSource.h
Header file for AudioReaderSource class.
ReaderBase.h
Header file for ReaderBase class.
RendererBase.h
Header file for RendererBase class.
VideoCacheThread.h
Header file for VideoCacheThread class.
VideoPlaybackThread.h
Source file for VideoPlaybackThread class.
openshot::AudioPlaybackThread
The audio playback thread.
Definition
AudioPlaybackThread.h:78
openshot::PlayerPrivate::QtPlayer
friend class QtPlayer
Definition
PlayerPrivate.h:73
openshot::PlayerPrivate::AudioPlaybackThreadTestAccess
friend struct AudioPlaybackThreadTestAccess
The parent class of PlayerPrivate.
Definition
PlayerPrivate.h:72
openshot::ReaderBase
This abstract class is the base class, used by all readers in libopenshot.
Definition
ReaderBase.h:76
openshot::RendererBase
This is the base class of all Renderers in libopenshot.
Definition
RendererBase.h:32
openshot::VideoCacheThread
Handles prefetching and caching of video/audio frames for smooth playback.
Definition
VideoCacheThread.h:39
openshot::VideoPlaybackThread
The video playback class.
Definition
VideoPlaybackThread.h:33
openshot
This namespace is the default namespace for all code in the openshot library.
Definition
AnimatedCurve.h:24
Qt
PlayerPrivate.h
Generated by
1.17.0