if (!m_properties.contains("name")) m_properties.insert("name", url.fileName());
m_thumbProd = new KThumb(clipManager, url, m_id, m_properties.value("file_hash"));
- if (m_clipType & (AV | AUDIO | PLAYLIST)) getAudioThumbs();
}
DocClipBase::~DocClipBase()
}
+bool DocClipBase::hasAudioThumb() const
+{
+ if (m_clipType == AUDIO || m_clipType == AV || m_clipType == PLAYLIST) return true;
+ return false;
+}
+
void DocClipBase::slotClearAudioCache()
{
m_audioFrameCache.clear();
m_audioThumbCreated = isDone;
}
-
-void DocClipBase::setThumbnail(const QPixmap & pixmap)
-{
- m_thumbnail = pixmap;
-}
-
-const QPixmap & DocClipBase::thumbnail() const
-{
- return m_thumbnail;
-}
-
void DocClipBase::updateAudioThumbnail(const audioByteArray& data)
{
//kDebug() << "CLIPBASE RECIEDVED AUDIO DATA*********************************************";
m_thumbProd->setProducer(producer);
}
else m_thumbProd->setProducer(producer);
+ getAudioThumbs();
}
bool updated = false;
if (id.contains('_')) {
m_thumbProd->extractImage(frames);
}
-QPixmap DocClipBase::extractImage(int frame, int width, int height)
+QImage DocClipBase::extractImage(int frame, int width, int height)
{
- if (m_thumbProd == NULL) return QPixmap(width, height);
+ if (m_thumbProd == NULL) return QImage();
QMutexLocker locker(&m_producerMutex);
- QPixmap p = m_thumbProd->extractImage(frame, width, height);
- return p;
+ return m_thumbProd->extractImage(frame, width, height);
}