cache: added cache task that can be manually invoked

This commit is contained in:
itsmattkc
2020-05-15 18:36:02 +10:00
parent 7c2280944b
commit 53a2956350
13 changed files with 346 additions and 76 deletions
+7 -2
View File
@@ -116,6 +116,11 @@ void FrameHashCache::SaveCacheFrame(const QByteArray& hash,
}
}
void FrameHashCache::SaveCacheFrame(const QByteArray &hash, FramePtr frame)
{
SaveCacheFrame(hash, frame->data(), frame->video_params());
}
void FrameHashCache::LengthChangedEvent(const rational &old, const rational &newlen)
{
if (newlen < old) {
@@ -174,8 +179,8 @@ bool FrameHashCache::SaveCacheFrame(const QString &filename, char *data, const V
// Attempt to keep this write to one thread
out->threads(1);
out->open(fn_std, OIIO::ImageSpec(vparam.width(),
vparam.height(),
out->open(fn_std, OIIO::ImageSpec(vparam.effective_width(),
vparam.effective_height(),
PixelFormat::ChannelCount(vparam.format()),
PixelFormat::GetOIIOTypeDesc(vparam.format())));