+
+
+ QDomNodeList producers = doc.elementsByTagName("producer");
+ QString producerResource;
+ QString suffix;
+ for (uint n = 0; n < producers.length(); n++) {
+ QDomElement e = producers.item(n).toElement();
+ producerResource = EffectsList::property(e, "resource");
+ if (producerResource.contains('?')) {
+ suffix = "?" + producerResource.section('?', 1);
+ producerResource = producerResource.section('?', 0, 0);
+ }
+ else suffix.clear();
+ if (!producerResource.isEmpty()) {
+ if (proxies.contains(producerResource)) {
+ 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 if (!root.isEmpty() && producerResource.startsWith(root) && proxies.contains(producerResource.remove(0, root.count() + 1))) {
+ EffectsList::setProperty(e, "resource", proxies.value(producerResource.remove(0, root.count() + 1)) + suffix);
+ // We need to delete the "aspect_ratio" property because proxy clips
+ // sometimes have different ratio than original clips
+ EffectsList::removeProperty(e, "aspect_ratio");
+ }
+ }
+ }
+
+ /*QMapIterator<QString, QString> i(proxies);