]> git.sesse.net Git - kdenlive/blobdiff - src/kthumb.cpp
*Re-introduce slideshow clips
[kdenlive] / src / kthumb.cpp
index 8f1b9d4785c308c0acd04c7e6db43f6cb8b31dd7..9d47cf486cfb9242a825dab267468170f6a1b515 100644 (file)
@@ -220,7 +220,25 @@ QPixmap KThumb::getImage(KUrl url, int frame, int width, int height) {
         return pix;
     }
     return getFrame(&producer, frame, width, height);
+}
+
+QPixmap KThumb::getImage(QDomElement xml, int frame, int width, int height) {
+    Mlt::Profile profile((char*) KdenliveSettings::current_profile().data());
+    QPixmap pix(width, height);
+    QDomDocument doc;
+    QDomElement westley = doc.createElement("westley");
+    doc.appendChild(westley);
+    westley.appendChild(doc.importNode(xml, true));
+    char *tmp = Render::decodedString(doc.toString());
+    kDebug()<<" - - - UPDATING THMB, XML: "<<doc.toString();
+    Mlt::Producer producer(profile, "westley-xml", tmp);
+    delete[] tmp;
 
+    if (producer.is_blank()) {
+        pix.fill(Qt::black);
+        return pix;
+    }
+    return getFrame(&producer, frame, width, height);
 }
 
 QPixmap KThumb::getFrame(Mlt::Producer* producer, int frame, int width, int height) {