Olive
cacher.h
Go to the documentation of this file.
1 /***
2 
3  Olive - Non-Linear Video Editor
4  Copyright (C) 2019 Olive Team
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef CACHER_H
22 #define CACHER_H
23 
24 #include <QThread>
25 #include <QVector>
26 
27 class Clip;
28 using ClipPtr = std::shared_ptr<Clip>;
29 
30 class Cacher : public QThread
31 {
32 // Q_OBJECT
33 public:
34  Cacher(ClipPtr c);
35  void run();
36 
37  bool caching;
38 
39  // must be set before caching
40  long playhead;
41  bool reset;
42  bool scrubbing;
43  bool interrupt;
44  bool queued;
46  QVector<ClipPtr> nests;
47 
48 private:
50 };
51 
52 void open_clip_worker(ClipPtr clip);
53 void cache_clip_worker(ClipPtr clip, long playhead, bool reset, bool scrubbing, QVector<ClipPtr> nest, int playback_speed);
54 void close_clip_worker(ClipPtr clip);
55 
56 #endif // CACHER_H
long playhead
Definition: cacher.h:40
bool caching
Definition: cacher.h:37
bool interrupt
Definition: cacher.h:43
bool reset
Definition: cacher.h:41
Definition: cacher.h:30
Cacher(ClipPtr c)
Definition: cacher.cpp:674
std::shared_ptr< Clip > ClipPtr
Definition: cacher.h:28
void run()
Definition: cacher.cpp:993
int playback_speed
Definition: cacher.h:45
QVector< ClipPtr > nests
Definition: cacher.h:46
ClipPtr clip
Definition: cacher.h:49
void open_clip_worker(ClipPtr clip)
Definition: cacher.cpp:678
void close_clip_worker(ClipPtr clip)
Definition: cacher.cpp:970
bool scrubbing
Definition: cacher.h:42
Definition: clip.h:50
bool queued
Definition: cacher.h:44
void cache_clip_worker(ClipPtr clip, long playhead, bool reset, bool scrubbing, QVector< ClipPtr > nest, int playback_speed)
Definition: cacher.cpp:950