OpenShot Library | libopenshot 1.1.1
Loading...
Searching...
No Matches
VideoPlaybackThread.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_VIDEO_PLAYBACK_THREAD_H
15#define OPENSHOT_VIDEO_PLAYBACK_THREAD_H
16
17#include <AppConfig.h>
18#include <juce_audio_basics/juce_audio_basics.h>
19#include <memory>
20#include <mutex>
21
22namespace openshot
23{
24 class Frame;
25 class RendererBase;
26 using juce::Thread;
27 using juce::WaitableEvent;
28
32 class VideoPlaybackThread : Thread
33 {
34 RendererBase *renderer;
35 std::shared_ptr<Frame> frame;
36 std::mutex frame_mutex;
37 WaitableEvent render;
38 WaitableEvent rendered;
39 bool reset;
40
45
47 int64_t getCurrentFramePosition();
48 void SetFrame(std::shared_ptr<Frame> next_frame);
49
51 void run();
52
54 friend class PlayerPrivate;
55 friend class QtPlayer;
56 };
57
58}
59
60#endif // OPENSHOT_VIDEO_PLAYBACK_THREAD_H
The private part of QtPlayer class, which contains an audio thread and video thread,...
This class is used to playback a video from a reader.
Definition QtPlayer.h:36
This is the base class of all Renderers in libopenshot.
The video playback class.
This namespace is the default namespace for all code in the openshot library.