cache: added cache task that can be manually invoked
This commit is contained in:
@@ -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())));
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ public:
|
||||
|
||||
static bool SaveCacheFrame(const QString& filename, char *data, const VideoRenderingParams &vparam);
|
||||
static void SaveCacheFrame(const QByteArray& hash, char *data, const VideoRenderingParams &vparam);
|
||||
static void SaveCacheFrame(const QByteArray& hash, FramePtr frame);
|
||||
|
||||
static QString GetFormatExtension(const PixelFormat::Format& f);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ OLIVE_NAMESPACE_ENTER
|
||||
|
||||
class PlaybackCache : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
PlaybackCache();
|
||||
|
||||
@@ -50,11 +50,11 @@ public:
|
||||
}
|
||||
|
||||
signals:
|
||||
void Invalidated(const TimeRange& r);
|
||||
void Invalidated(const OLIVE_NAMESPACE::TimeRange& r);
|
||||
|
||||
void Validated(const TimeRange& r);
|
||||
void Validated(const OLIVE_NAMESPACE::TimeRange& r);
|
||||
|
||||
void LengthChanged(const rational& r);
|
||||
void LengthChanged(const OLIVE_NAMESPACE::rational& r);
|
||||
|
||||
protected:
|
||||
void Validate(const TimeRange& r);
|
||||
|
||||
Reference in New Issue
Block a user