Run moodbar pipeline threads at idle CPU and IO priority. Fixes issue 3644.

This commit is contained in:
David Sansome 2013-05-04 22:48:11 +10:00
parent fe964b9457
commit a3f927cde2
2 changed files with 4 additions and 1 deletions

View File

@ -111,7 +111,7 @@ MoodbarLoader::Result MoodbarLoader::Load(
}
if (!thread_->isRunning())
thread_->start();
thread_->start(QThread::IdlePriority);
// There was no existing file, analyze the audio file and create one.
MoodbarPipeline* pipeline = new MoodbarPipeline(url);

View File

@ -23,6 +23,7 @@
#include "core/logging.h"
#include "core/signalchecker.h"
#include "core/utilities.h"
bool MoodbarPipeline::sIsAvailable = false;
@ -74,6 +75,8 @@ GstElement* MoodbarPipeline::CreateElement(const QString& factory_name) {
void MoodbarPipeline::Start() {
Q_ASSERT(QThread::currentThread() != qApp->thread());
Utilities::SetThreadIOPriority(Utilities::IOPRIO_CLASS_IDLE);
if (pipeline_) {
return;
}