finished hashing algorithm for cache

This commit is contained in:
itsmattkc
2019-09-02 19:51:31 +10:00
parent b563b9e783
commit e87ed9dd3d
12 changed files with 124 additions and 44 deletions
+4 -3
View File
@@ -97,12 +97,13 @@ void MediaInput::SetFootage(Footage *f)
footage_input_->set_value(PtrToValue(f));
}
void MediaInput::Hash(QCryptographicHash *hash, const rational &time)
void MediaInput::Hash(QCryptographicHash *hash, NodeOutput *from, const rational &time)
{
Node::Hash(hash, time);
Node::Hash(hash, from, time);
// Use frame value from Decoder
if (SetupDecoder()) {
if (from == texture_output_ && SetupDecoder()) {
qDebug() << "[MediaInput] Hashing pts" << decoder_->GetTimestampFromTime(time);
hash->addData(QString::number(decoder_->GetTimestampFromTime(time)).toUtf8());
// FIXME: Add OCIO data
// FIXME: Add alpha association value
+1 -1
View File
@@ -51,7 +51,7 @@ public:
void SetFootage(Footage* f);
virtual void Hash(QCryptographicHash *hash, const rational &time) override;
virtual void Hash(QCryptographicHash *hash, NodeOutput* from, const rational &time) override;