// replace proxy clips with originals
QMap <QString, QString> proxies = m_projectList->getProxies();
-
QDomNodeList producers = doc.elementsByTagName("producer");
QString producerResource;
QString suffix;
producerResource = EffectsList::property(e, "resource");
if (producerResource.isEmpty()) continue;
if (!producerResource.startsWith("/")) {
- producerResource = root + "/" + producerResource;
+ producerResource.prepend(root + "/");
}
if (producerResource.contains('?')) {
// slowmotion producer
// sometimes have different ratio than original clips
EffectsList::removeProperty(e, "aspect_ratio");
}
- else if (!root.isEmpty() && producerResource.startsWith(root) && proxies.contains(producerResource.remove(0, root.count() + 1))) {
- EffectsList::setProperty(e, "resource", proxies.value(producerResource) + suffix);
- // We need to delete the "aspect_ratio" property because proxy clips
- // sometimes have different ratio than original clips
- EffectsList::removeProperty(e, "aspect_ratio");
- }
}
}
else maxSize = m_doc->getDocumentProperty("proxyminsize").toInt();
if (((t == AV || t == VIDEO) && generateProxy() && size.section('x', 0, 0).toInt() > maxSize) || (t == IMAGE && generateImageProxy() && (size.section('x', 0, 0).toInt() > maxSize || size.section('x', 1, 1).toInt() > maxSize))) {
if (clip->getProperty("proxy").isEmpty()) {
- QString proxydir = m_doc->projectFolder().path( KUrl::AddTrailingSlash) + "proxy/";
+ KUrl proxyPath = m_doc->projectFolder();
+ proxyPath.addPath("proxy/");
+ proxyPath.addPath(clip->getClipHash() + "." + (t == IMAGE ? "png" : m_doc->getDocumentProperty("proxyextension")));
QMap <QString, QString> newProps;
- QString path = proxydir + clip->getClipHash() + "." + (t == IMAGE ? "png" : m_doc->getDocumentProperty("proxyextension"));
- newProps.insert("proxy", path);
+ newProps.insert("proxy", proxyPath.path());
// insert required duration for proxy
if (t != IMAGE) newProps.insert("proxy_out", clip->producerProperty("out"));
QMap <QString, QString> oldProps = clip->properties();