- resetThumbsProducer(clip);
- oldProps = clip->properties();
- if (doProxy) {
- newProps.clear();
- QString path = proxydir + clip->getClipHash() + "." + (t == IMAGE ? "png" : m_doc->getDocumentProperty("proxyextension"));
- // insert required duration for proxy
- newProps.insert("proxy_out", clip->producerProperty("out"));
- newProps.insert("proxy", path);
- // We need to insert empty proxy so that undo will work
- oldProps.insert("proxy", QString());
- }
- else if (item->referencedClip()->getProducer() == NULL) {
- // Force clip reload
- newProps.insert("resource", item->referencedClip()->getProperty("resource"));
- }
- new EditClipCommand(this, item->clipId(), oldProps, newProps, true, command);
+ QMap <QString, QString> newProps;
+ QMap <QString, QString> oldProps;
+ if (!doProxy) newProps.insert("proxy", "-");
+ for (int i = 0; i < clipList.count(); i++) {
+ ProjectItem *item = clipList.at(i);
+ CLIPTYPE t = item->clipType();
+ if ((t == VIDEO || t == AV || t == UNKNOWN || t == IMAGE || t == PLAYLIST) && item->referencedClip()) {
+ if ((doProxy && item->hasProxy()) || (!doProxy && !item->hasProxy() && item->referencedClip()->getProducer() != NULL)) continue;
+ DocClipBase *clip = item->referencedClip();
+ if (!clip || !clip->isClean() || m_render->isProcessing(item->clipId())) {
+ kDebug()<<"//// TRYING TO PROXY: "<<item->clipId()<<", but it is busy";
+ continue;
+ }
+
+ resetThumbsProducer(clip);
+ oldProps = clip->properties();
+ if (doProxy) {
+ newProps.clear();
+ QString path = proxydir + clip->getClipHash() + "." + (t == IMAGE ? "png" : m_doc->getDocumentProperty("proxyextension"));
+ // insert required duration for proxy
+ newProps.insert("proxy_out", clip->producerProperty("out"));
+ newProps.insert("proxy", path);
+ // We need to insert empty proxy so that undo will work
+ oldProps.insert("proxy", QString());
+ }
+ else if (item->referencedClip()->getProducer() == NULL) {
+ // Force clip reload
+ kDebug()<<"// CLIP HAD NULL PROD------------";
+ newProps.insert("resource", item->referencedClip()->getProperty("resource"));