Olive
playback.h
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 PLAYBACK_H
22 #define PLAYBACK_H
23 
24 #include <QVector>
25 #include <QMutex>
26 
27 class Clip;
28 struct ClipCache;
29 struct Sequence;
30 struct AVFrame;
31 
32 long refactor_frame_number(long framenumber, double source_frame_rate, double target_frame_rate);
33 bool clip_uses_cacher(Clip* clip);
34 void open_clip(Clip* clip, bool multithreaded);
35 void cache_clip(Clip* clip, long playhead, bool reset, bool scrubbing, QVector<Clip *> &nests, int playback_speed);
36 void close_clip(Clip* clip, bool wait);
37 void handle_media(Sequence* sequence, long playhead, bool multithreaded);
38 void reset_cache(Clip* c, long target_frame, int playback_speed);
39 void get_clip_frame(Clip* c, long playhead, bool &texture_failed);
40 double get_timecode(Clip* c, long playhead);
41 
42 long playhead_to_clip_frame(Clip* c, long playhead);
43 double playhead_to_clip_seconds(Clip* c, long playhead);
44 int64_t seconds_to_timestamp(Clip* c, double seconds);
45 int64_t playhead_to_timestamp(Clip* c, long playhead);
46 
47 int retrieve_next_frame(Clip* c, AVFrame* f);
48 bool is_clip_active(Clip* c, long playhead);
49 void get_next_audio(Clip* c, bool mix);
50 void set_sequence(Sequence* s);
51 void closeActiveClips(Sequence* s);
52 
53 #endif // PLAYBACK_H
Definition: sequence.h:33
Definition: clip.h:53