]> git.sesse.net Git - kdenlive/blobdiff - thumbnailer/westleypreview.h
Integrate with the required MLT hooks for getting Movit to work.
[kdenlive] / thumbnailer / westleypreview.h
index 76209c595da98943c035e0800db118842fc80c35..678d2a24353380460e2edf589cf17d884f629417 100644 (file)
  ***************************************************************************/
 
 
-#ifndef _westleypreview_H_
-#define _westleypreview_H_
+#ifndef WESTLEYPREVIEW_H
+#define WESTLEYPREVIEW_H
 
-#include <qstring.h>
-
-#include <qpixmap.h>
 #include <kio/thumbcreator.h>
-#include <qobject.h>
-
-class QProcess;
-class KTempDir;
-class KRandomSequence;
 
+#include <mlt++/Mlt.h>
 
+#include <QStringList>
+#include <QObject>
 
-
-class WestleyPreview : public QObject, public ThumbCreator {
+class MltPreview : public QObject, public ThumbCreator
+{
     Q_OBJECT
 public:
-    WestleyPreview();
-    virtual ~WestleyPreview();
+    MltPreview();
+    virtual ~MltPreview();
     virtual bool create(const QString &path, int width, int height, QImage &img);
     virtual Flags flags() const;
 
 protected:
-    QPixmap getFrame(const QString &path);
-    static uint imageVariance(QImage image);
-
-private:
-    QPixmap m_pixmap;
-    QProcess *m_inigoprocess;
-    QStringList customargs;
-    KRandomSequence *m_rand;
-    QString playerBin;
-    bool startAndWaitProcess(const QStringList &args);
-    enum frameflags { framerandom = 0x1, framestart = 0x2, frameend = 0x4 };
-    struct {
-        int towidth;
-        int toheight;
-        int fps;
-        int seconds;
-    } fileinfo;
+    static uint imageVariance(const QImage &image);
+    QImage getFrame(Mlt::Producer* producer, int framepos, int width, int height);
 };
 
 #endif