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
+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();