Merge remote-tracking branch 'upstream/master' into pull_requests
This commit is contained in:
+8
-13
@@ -45,10 +45,9 @@ Config::Config()
|
||||
upcoming_queue_size(0.5),
|
||||
upcoming_queue_type(FRAME_QUEUE_TYPE_SECONDS),
|
||||
loop(true),
|
||||
pause_at_out_point(true),
|
||||
seek_also_selects(false),
|
||||
effect_textbox_lines(3),
|
||||
use_software_fallback(false)
|
||||
effect_textbox_lines(3),
|
||||
use_software_fallback(false)
|
||||
{}
|
||||
|
||||
void Config::load(QString path) {
|
||||
@@ -158,9 +157,6 @@ void Config::load(QString path) {
|
||||
} else if (stream.name() == "Loop") {
|
||||
stream.readNext();
|
||||
loop = (stream.text() == "1");
|
||||
} else if (stream.name() == "PauseAtOutPoint") {
|
||||
stream.readNext();
|
||||
pause_at_out_point = (stream.text() == "1");
|
||||
} else if (stream.name() == "SeekAlsoSelects") {
|
||||
stream.readNext();
|
||||
seek_also_selects = (stream.text() == "1");
|
||||
@@ -170,10 +166,10 @@ void Config::load(QString path) {
|
||||
} else if (stream.name() == "EffectTextboxLines") {
|
||||
stream.readNext();
|
||||
effect_textbox_lines = stream.text().toInt();
|
||||
} else if (stream.name() == "UseSoftwareFallback") {
|
||||
stream.readNext();
|
||||
use_software_fallback = (stream.text() == "1");
|
||||
}
|
||||
} else if (stream.name() == "UseSoftwareFallback") {
|
||||
stream.readNext();
|
||||
use_software_fallback = (stream.text() == "1");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (stream.hasError()) {
|
||||
@@ -230,11 +226,10 @@ void Config::save(QString path) {
|
||||
stream.writeTextElement("UpcomingFrameQueueSize", QString::number(upcoming_queue_size));
|
||||
stream.writeTextElement("UpcomingFrameQueueType", QString::number(upcoming_queue_type));
|
||||
stream.writeTextElement("Loop", QString::number(loop));
|
||||
stream.writeTextElement("PauseAtOutPoint", QString::number(pause_at_out_point));
|
||||
stream.writeTextElement("SeekAlsoSelects", QString::number(seek_also_selects));
|
||||
stream.writeTextElement("CSSPath", css_path);
|
||||
stream.writeTextElement("EffectTextboxLines", QString::number(effect_textbox_lines));
|
||||
stream.writeTextElement("UseSoftwareFallback", QString::number(use_software_fallback));
|
||||
stream.writeTextElement("EffectTextboxLines", QString::number(effect_textbox_lines));
|
||||
stream.writeTextElement("UseSoftwareFallback", QString::number(use_software_fallback));
|
||||
|
||||
stream.writeEndElement(); // configuration
|
||||
stream.writeEndDocument(); // doc
|
||||
|
||||
@@ -59,7 +59,6 @@ struct Config {
|
||||
double upcoming_queue_size;
|
||||
int upcoming_queue_type;
|
||||
bool loop;
|
||||
bool pause_at_out_point;
|
||||
bool seek_also_selects;
|
||||
QString css_path;
|
||||
int effect_textbox_lines;
|
||||
|
||||
@@ -21,3 +21,24 @@ QStringList LibFilter() {
|
||||
return {"*.so", "*.dylib"};
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
CFBundleRef BundleLoad(const QString &filename) {
|
||||
CFStringRef bundle_str = CFStringCreateWithCString(NULL, filename.toUtf8(), kCFStringEncodingUTF8);
|
||||
CFURLRef bundle_url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, bundle_str, kCFURLPOSIXPathStyle, true);
|
||||
CFBundleRef bundle = NULL;
|
||||
if (bundle_url != NULL) {
|
||||
bundle = CFBundleCreate(kCFAllocatorDefault, bundle_url);
|
||||
} else {
|
||||
qCritical() << "Failed to create VST URL";
|
||||
}
|
||||
CFRelease(bundle_url);
|
||||
CFRelease(bundle_str);
|
||||
return bundle;
|
||||
}
|
||||
|
||||
void BundleClose(CFBundleRef bundle) {
|
||||
CFBundleUnloadExecutable(bundle);
|
||||
CFRelease(bundle);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -18,4 +18,12 @@
|
||||
ModulePtr LibLoad(const QString& filename);
|
||||
QStringList LibFilter();
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
class NSWindow;
|
||||
|
||||
CFBundleRef BundleLoad(const QString& filename);
|
||||
void BundleClose(CFBundleRef bundle);
|
||||
#endif
|
||||
|
||||
#endif // CROSSPLATFORMLIB_H
|
||||
|
||||
+3
-3
@@ -351,7 +351,7 @@ void ExportThread::run() {
|
||||
start_time = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
if (audio_enabled) {
|
||||
compose_audio(nullptr, sequence, true);
|
||||
compose_audio(nullptr, sequence, true, false);
|
||||
}
|
||||
if (video_enabled) {
|
||||
do {
|
||||
@@ -489,7 +489,7 @@ void ExportThread::run() {
|
||||
}
|
||||
|
||||
void ExportThread::wake() {
|
||||
mutex.lock();
|
||||
mutex.lock();
|
||||
waitCond.wakeAll();
|
||||
mutex.unlock();
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ void PreviewGenerator::parse_media() {
|
||||
ms.preview_done = false;
|
||||
ms.file_index = i;
|
||||
ms.enabled = true;
|
||||
ms.infinite_length = false;
|
||||
|
||||
bool append = false;
|
||||
|
||||
@@ -77,7 +78,6 @@ void PreviewGenerator::parse_media() {
|
||||
&& fmt_ctx->streams[i]->codecpar->codec_id != AV_CODEC_ID_DNXHD) { // silly hack but this is the only scenario i've seen this
|
||||
if (footage->url.contains('%')) {
|
||||
// must be an image sequence
|
||||
ms.infinite_length = false;
|
||||
ms.video_frame_rate = 25;
|
||||
} else {
|
||||
ms.infinite_length = true;
|
||||
@@ -85,8 +85,6 @@ void PreviewGenerator::parse_media() {
|
||||
ms.video_frame_rate = 0;
|
||||
}
|
||||
} else {
|
||||
ms.infinite_length = false;
|
||||
|
||||
// using ffmpeg's built-in heuristic
|
||||
ms.video_frame_rate = av_q2d(av_guess_frame_rate(fmt_ctx, fmt_ctx->streams[i], nullptr));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user