implemented core UI caching feedback functionality

Not a perfect implementation yet, but this shows UI feedback on what frames are
cached and which ones aren't.
This commit is contained in:
itsmattkc
2020-01-03 05:38:20 +11:00
parent f13f5b5fdb
commit db146b376a
18 changed files with 232 additions and 99 deletions
@@ -81,6 +81,21 @@ void VideoRenderFrameCache::RemoveHashFromCurrentlyCaching(const QByteArray &has
currently_caching_lock_.unlock();
}
QList<rational> VideoRenderFrameCache::FramesWithHash(const QByteArray &hash)
{
QList<rational> times;
QMap<rational, QByteArray>::const_iterator iterator;
for (iterator=time_hash_map_.begin();iterator!=time_hash_map_.end();iterator++) {
if (iterator.value() == hash) {
times.append(iterator.key());
}
}
return times;
}
QString VideoRenderFrameCache::CachePathName(const QByteArray &hash) const
{
QDir this_cache_dir = QDir(GetMediaCacheLocation()).filePath(cache_id_);