X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdocclipbase.cpp;h=50300cc4a26d4c0fe13db2796f9c56ce86122c8a;hb=67202227a6d1c64ac1112273db86c6329843358a;hp=214693c6eef5df9667a995cf160b6e024b5bc9fc;hpb=0a381233be965974d175f34899ed5422e71e6d00;p=kdenlive diff --git a/src/docclipbase.cpp b/src/docclipbase.cpp index 214693c6..50300cc4 100644 --- a/src/docclipbase.cpp +++ b/src/docclipbase.cpp @@ -31,9 +31,11 @@ #include "slideshowclip.h" #include +#include #include #include +#include #include @@ -594,7 +596,7 @@ Mlt::Producer *DocClipBase::producer(int track) 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()); @@ -655,7 +657,6 @@ const char *DocClipBase::producerProperty(const char *name) const 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; @@ -861,7 +862,11 @@ QString DocClipBase::getClipHash() const 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; } @@ -965,6 +970,16 @@ void DocClipBase::setProperty(const QString &key, const QString &value) 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 DocClipBase::properties() const @@ -1079,3 +1094,5 @@ bool DocClipBase::hasAudioCodec(const QString &codec) const return prod->get(property) == codec; } + +