Changeset View
Changeset View
Standalone View
Standalone View
src/jobs/thumbjob.cpp
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 65 | if (m_subClip) { | |||
---|---|---|---|---|---|
67 | m_binClip = std::static_pointer_cast<ProjectClip>(item->parent()); | 67 | m_binClip = std::static_pointer_cast<ProjectClip>(item->parent()); | ||
68 | } else { | 68 | } else { | ||
69 | m_binClip = pCore->projectItemModel()->getClipByBinID(m_clipId); | 69 | m_binClip = pCore->projectItemModel()->getClipByBinID(m_clipId); | ||
70 | } | 70 | } | ||
71 | if (m_binClip->clipType() == ClipType::Audio) { | 71 | if (m_binClip->clipType() == ClipType::Audio) { | ||
72 | // Don't create thumbnail for audio clips | 72 | // Don't create thumbnail for audio clips | ||
73 | return true; | 73 | return true; | ||
74 | } | 74 | } | ||
75 | m_prod = m_binClip->originalProducer(); | 75 | m_prod = m_binClip->thumbProducer(); | ||
76 | if ((m_prod == nullptr) || !m_prod->is_valid()) { | 76 | if ((m_prod == nullptr) || !m_prod->is_valid()) { | ||
77 | return false; | 77 | return false; | ||
78 | } | 78 | } | ||
79 | int max = m_prod->get_length(); | 79 | int max = m_prod->get_length(); | ||
80 | m_frameNumber = std::min(max - 1, m_frameNumber); | 80 | m_frameNumber = std::min(max - 1, m_frameNumber); | ||
81 | 81 | | |||
82 | // m_frameNumber = ProjectClip::getXmlProperty(info.xml, QStringLiteral("kdenlive:thumbnailFrame"), QStringLiteral("-1")).toInt(); | 82 | // m_frameNumber = ProjectClip::getXmlProperty(info.xml, QStringLiteral("kdenlive:thumbnailFrame"), QStringLiteral("-1")).toInt(); | ||
83 | if (ThumbnailCache::get()->hasThumbnail(m_binClip->clipId(), m_frameNumber, !m_persistent)) { | 83 | if (ThumbnailCache::get()->hasThumbnail(m_binClip->clipId(), m_frameNumber, !m_persistent)) { | ||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |