proxy: cleaned up, re-use the render cache's disk save system for proxies, multithreaded compression

This commit is contained in:
itsmattkc
2020-05-04 00:29:26 +10:00
parent f7f437ab04
commit e4e797c901
14 changed files with 318 additions and 226 deletions
+11 -5
View File
@@ -25,6 +25,7 @@
#include "common/rational.h"
#include "render/pixelformat.h"
#include "render/videoparams.h"
OLIVE_NAMESPACE_ENTER
@@ -50,11 +51,6 @@ public:
*/
bool TryCache(const QByteArray& hash);
/**
* @brief Return the path of the cached image at this time
*/
QString CachePathName(const QByteArray &hash, const PixelFormat::Format& pix_fmt) const;
void SetCacheID(const QString& id);
QByteArray TimeToHash(const rational& time) const;
@@ -77,6 +73,16 @@ public:
const QMap<rational, QByteArray>& time_hash_map() const;
static QString GetFormatExtension(const PixelFormat::Format& f);
/**
* @brief Return the path of the cached image at this time
*/
QString CachePathName(const QByteArray &hash, const PixelFormat::Format& pix_fmt) const;
static bool SaveCacheFrame(const QString& filename, char *data, const VideoRenderingParams &vparam);
void SaveCacheFrame(const QByteArray& hash, char *data, const VideoRenderingParams &vparam) const;
private:
QMap<rational, QByteArray> time_hash_map_;