#include "slideshowclip.h"
#include <KIO/NetAccess>
+#include <KStandardDirs>
#include <KDebug>
#include <QCryptographicHash>
+#include <QtConcurrentRun>
#include <cstdio>
void DocClipBase::slotRefreshProducer()
{
if (m_baseTrackProducers.count() == 0) return;
- kDebug() << "//////////// REFRESH CLIP !!!!!!!!!!!!!!!!";
if (m_clipType == SLIDESHOW) {
/*Mlt::Producer producer(*(m_clipProducer->profile()), getProperty("resource").toUtf8().data());
delete m_clipProducer;
if (m_clipType == SLIDESHOW) hash = QCryptographicHash::hash(m_properties.value("resource").toAscii().data(), QCryptographicHash::Md5).toHex();
else if (m_clipType == COLOR) hash = QCryptographicHash::hash(m_properties.value("colour").toAscii().data(), QCryptographicHash::Md5).toHex();
else if (m_clipType == TEXT) hash = QCryptographicHash::hash(QString("title" + getId() + m_properties.value("xmldata")).toUtf8().data(), QCryptographicHash::Md5).toHex();
- else hash = m_properties.value("file_hash");
+ else {
+ if (m_properties.contains("file_hash")) hash = m_properties.value("file_hash");
+ else hash = getHash(fileURL().path());
+
+ }
return hash;
}
resetProducerProperty("set.force_full_luma");
} else setProducerProperty("set.force_full_luma", value.toInt());
}
+ else if (key == "proxy") {
+ // If value is "-", that means user manually disabled proxy on this clip
+ if (value.isEmpty() || value == "-") {
+ // reset proxy
+ emit abortProxy(m_id);
+ }
+ else {
+ emit createProxy(m_id);
+ }
+ }
}
QMap <QString, QString> DocClipBase::properties() const
return prod->get(property) == codec;
}
+
+