effects system rewrite
This commit is contained in:
+1
-1
@@ -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
@@ -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();
|
||||
|
||||
@@ -53,6 +53,7 @@ struct Media {
|
||||
bool ready;
|
||||
|
||||
PreviewGenerator* preview_gen;
|
||||
QMutex ready_lock;
|
||||
|
||||
bool using_inout;
|
||||
long in;
|
||||
|
||||
+15
-3
@@ -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 {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
QString get_app_dir();
|
||||
QString get_data_path();
|
||||
QString get_effects_dir();
|
||||
|
||||
#endif // PATH_H
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user