void DocClipBase::slotCreateAudioTimer()
{
connect(m_thumbProd, SIGNAL(audioThumbReady(QMap <int, QMap <int, QByteArray> >)), this , SLOT(updateAudioThumbnail(QMap <int, QMap <int, QByteArray> >)));
- connect(this, SIGNAL(getAudioThumbs()), this , SLOT(slotGetAudioThumbs()));
m_audioTimer = new QTimer(this);
connect(m_audioTimer, SIGNAL(timeout()), this, SLOT(slotGetAudioThumbs()));
}
m_baseTrackProducers.clear();
}
-void DocClipBase::deleteProducers()
+void DocClipBase::deleteProducers(bool clearThumbCreator)
{
kDebug() << "// CLIP KILL PRODS ct: " << m_baseTrackProducers.count();
- if (m_thumbProd) m_thumbProd->clearProducer();
+ if (clearThumbCreator && m_thumbProd) m_thumbProd->clearProducer();
/*kDebug()<<"// CLIP KILL PRODS ct: "<<m_baseTrackProducers.count();
int max = m_baseTrackProducers.count();
for (int i = 0; i < max; i++) {
void DocClipBase::setProducer(Mlt::Producer *producer, bool reset)
{
- if (producer == NULL || m_placeHolder) return;
+ if (producer == NULL || (m_placeHolder && !reset)) return;
+ if (m_thumbProd && (reset || !m_thumbProd->hasProducer())) m_thumbProd->setProducer(producer);
if (reset) {
// Clear all previous producers
kDebug() << "/+++++++++++++++ DELETE ALL PRODS " << producer->get("id");
- deleteProducers();
+ deleteProducers(false);
}
QString id = producer->get("id");
if (id.contains('_')) {
}
//m_clipProducer = producer;
//m_clipProducer->set("transparency", m_properties.value("transparency").toInt());
- if (m_thumbProd && (reset || !m_thumbProd->hasProducer())) m_thumbProd->setProducer(producer);
}
Mlt::Producer *DocClipBase::audioProducer(int track)
}
}
+bool DocClipBase::checkHash() const
+{
+ KUrl url = fileURL();
+ if (!url.isEmpty() && getClipHash() != getHash(url.path())) return false;
+ return true;
+}
+
QString DocClipBase::getClipHash() const
{
QString hash;
return hash;
}
+void DocClipBase::setPlaceHolder(bool place)
+{
+ m_placeHolder = place;
+}
+
// static
QString DocClipBase::getHash(const QString &path)
{