#include "slideshowclip.h"
#include <KIO/NetAccess>
+#include <KStandardDirs>
#include <KDebug>
#include <QCryptographicHash>
+#include <QtConcurrentRun>
#include <cstdio>
return NULL;
}
if (m_properties.contains("force_aspect_num") && m_properties.contains("force_aspect_den") && m_properties.contains("frame_size"))
- m_baseTrackProducers[track]->set("force_aspect_raio", getPixelAspect(m_properties));
+ m_baseTrackProducers[track]->set("force_aspect_ratio", getPixelAspect(m_properties));
if (m_properties.contains("force_fps")) m_baseTrackProducers[track]->set("force_fps", m_properties.value("force_fps").toDouble());
if (m_properties.contains("force_progressive")) m_baseTrackProducers[track]->set("force_progressive", m_properties.value("force_progressive").toInt());
if (m_properties.contains("force_tff")) m_baseTrackProducers[track]->set("force_tff", m_properties.value("force_tff").toInt());
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;
}
+
+