effects system rewrite

This commit is contained in:
itsmattkc
2018-10-30 11:23:14 +11:00
parent 0817a1e486
commit 10347f9418
16 changed files with 327 additions and 144 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
#include <QString>
#define SAVE_VERSION "180820" // YYMMDD
#define SAVE_VERSION "181030" // YYMMDD
#define TIMECODE_DROP 0
#define TIMECODE_NONDROP 1
+3 -1
View File
@@ -10,7 +10,9 @@ extern "C" {
#include "project/clip.h"
Media::Media() : ready(false), preview_gen(NULL) {}
Media::Media() : ready(false), preview_gen(NULL) {
ready_lock.lock();
}
Media::~Media() {
reset();
+1
View File
@@ -53,6 +53,7 @@ struct Media {
bool ready;
PreviewGenerator* preview_gen;
QMutex ready_lock;
bool using_inout;
long in;
+15 -3
View File
@@ -4,10 +4,22 @@
#include <QFileInfo>
#include <QCoreApplication>
QString get_data_path() {
QString app_path = QCoreApplication::applicationFilePath();
QString app_dir = app_path.left(app_path.lastIndexOf('/'));
QString real_app_dir;
QString get_effects_dir() {
return get_app_dir() + "/effects";
}
QString get_app_dir() {
if (real_app_dir.isEmpty()) {
QString app_path = QCoreApplication::applicationFilePath();
real_app_dir = app_path.left(app_path.lastIndexOf('/'));
}
return real_app_dir;
}
QString get_data_path() {
QString app_dir = get_app_dir();
if (QFileInfo::exists(app_dir + "/portable")) {
return app_dir;
} else {
+2
View File
@@ -3,6 +3,8 @@
#include <QString>
QString get_app_dir();
QString get_data_path();
QString get_effects_dir();
#endif // PATH_H
+1
View File
@@ -168,6 +168,7 @@ bool PreviewGenerator::retrieve_preview(const QString& hash) {
}
void PreviewGenerator::finalize_media() {
media->ready_lock.unlock();
media->ready = true;
if (media->video_tracks.size() == 0) {