X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=thumbnailer%2Fwestleypreview.h;h=678d2a24353380460e2edf589cf17d884f629417;hb=56aee6aedeeed3efd10ada8fe3c229eddc01ef05;hp=4595d453c4a6f90158e53512bc727866bc6f3128;hpb=a97b0c01710b048ff8e8640378457f410f77321c;p=kdenlive diff --git a/thumbnailer/westleypreview.h b/thumbnailer/westleypreview.h index 4595d453..678d2a24 100644 --- a/thumbnailer/westleypreview.h +++ b/thumbnailer/westleypreview.h @@ -20,43 +20,28 @@ ***************************************************************************/ -#ifndef _westleypreview_H_ -#define _westleypreview_H_ +#ifndef WESTLEYPREVIEW_H +#define WESTLEYPREVIEW_H -#include -#include - -#include #include -class QProcess; -class Q3CString; -class KTempDir; -class KRandomSequence; -#include - +#include +#include +#include -class WestleyPreview : public QObject, public ThumbCreator +class MltPreview : public QObject, public ThumbCreator { -Q_OBJECT - public: - WestleyPreview(); - virtual ~WestleyPreview(); - virtual bool create(const QString &path, int width, int height, QImage &img); - protected: - QPixmap getFrame(const QString &path); - static uint imageVariance(QImage image ); - - private: - QPixmap m_pixmap; - QProcess *inigoprocess; - QStringList customargs; - KRandomSequence *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; + Q_OBJECT +public: + MltPreview(); + virtual ~MltPreview(); + virtual bool create(const QString &path, int width, int height, QImage &img); + virtual Flags flags() const; + +protected: + static uint imageVariance(const QImage &image); + QImage getFrame(Mlt::Producer* producer, int framepos, int width, int height); }; #endif