renderer/decoder: use same background mechanism to conform audio as well

This commit is contained in:
itsmattkc
2020-02-19 16:45:34 +11:00
parent 5166f6a54a
commit e68e89c40b
16 changed files with 239 additions and 18 deletions
+1
View File
@@ -6,6 +6,7 @@ ConformTask::ConformTask(AudioStreamPtr stream, const AudioRenderingParams& para
stream_(stream),
params_(params)
{
SetTitle(tr("Conforming Audio %1:%2").arg(stream_->footage()->filename(), QString::number(stream_->index())));
}
void ConformTask::Action()
+6
View File
@@ -1,6 +1,7 @@
#include "index.h"
#include "codec/decoder.h"
#include "codec/ffmpeg/ffmpegdecoder.h"
IndexTask::IndexTask(StreamPtr stream) :
stream_(stream)
@@ -17,6 +18,11 @@ void IndexTask::Action()
decoder->set_stream(stream_);
// Force multithreading for faster indexing
if (decoder->id() == "ffmpeg") {
static_cast<FFmpegDecoder*>(decoder.get())->SetMultithreading(true);
}
connect(decoder.get(), &Decoder::IndexProgress, this, &IndexTask::ProgressChanged);
decoder->Open();
+1
View File
@@ -164,6 +164,7 @@ void TaskManager::DeleteTask(Task *t)
break;
}
}
emit t->Removed();
if (GetTaskStatus(t) != kWorking) {