move cache saving to renderprocessor
In my testing, this doesn't seem to help performance whatsoever, but at least the code is cleaner.
This commit is contained in:
@@ -182,6 +182,14 @@ void RenderProcessor::Run()
|
||||
// Convert to CPU frame
|
||||
FramePtr frame = GenerateFrame(texture, time);
|
||||
|
||||
QString cache = ticket_->property("cache").toString();
|
||||
if (!cache.isEmpty()) {
|
||||
rational timebase = ticket_->property("cachetimebase").value<rational>();
|
||||
QUuid uuid = ticket_->property("cacheuuid").value<QUuid>();
|
||||
bool cache_result = FrameHashCache::SaveCacheFrame(cache, uuid, time, timebase, frame);
|
||||
ticket_->setProperty("cached", cache_result);
|
||||
}
|
||||
|
||||
ticket_->Finish(QVariant::fromValue(frame));
|
||||
}
|
||||
break;
|
||||
@@ -215,17 +223,6 @@ void RenderProcessor::Run()
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RenderManager::kTypeVideoDownload:
|
||||
{
|
||||
QString cache = ticket_->property("cache").toString();
|
||||
FramePtr frame = ticket_->property("frame").value<FramePtr>();
|
||||
rational time = ticket_->property("time").value<rational>();
|
||||
rational timebase = ticket_->property("timebase").value<rational>();
|
||||
QUuid uuid = ticket_->property("uuid").value<QUuid>();
|
||||
|
||||
ticket_->Finish(FrameHashCache::SaveCacheFrame(cache, uuid, time, timebase, frame));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Fail
|
||||
ticket_->Finish();
|
||||
|
||||
Reference in New Issue
Block a user