move gl rendering to another thread

This commit is contained in:
itsmattkc
2019-01-15 17:48:36 +11:00
parent f3b0a3355c
commit 658a6d379e
15 changed files with 872 additions and 585 deletions
+4
View File
@@ -36,6 +36,10 @@ extern "C" {
bool texture_failed = false;
bool rendering = false;
long refactor_frame_number(long framenumber, double source_frame_rate, double target_frame_rate) {
return qRound((double(framenumber)/source_frame_rate)*target_frame_rate);
}
bool clip_uses_cacher(Clip* clip) {
return (clip->media == nullptr && clip->track >= 0) || (clip->media != nullptr && clip->media->get_type() == MEDIA_TYPE_FOOTAGE);
}
+1
View File
@@ -12,6 +12,7 @@ struct AVFrame;
extern bool texture_failed;
extern bool rendering;
long refactor_frame_number(long framenumber, double source_frame_rate, double target_frame_rate);
bool clip_uses_cacher(Clip* clip);
void open_clip(Clip* clip, bool multithreaded);
void cache_clip(Clip* clip, long playhead, bool reset, bool scrubbing, QVector<Clip *> &nests);