X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fkthumb.h;h=a0255210178858285c1bd9b6de2db549b8325f19;hb=67b516688ebe28ebae23296ea72e11ae2fb52cf2;hp=f249b071a9037f94425cb419449fcd92cb9c7a90;hpb=f1fc545bde368bde82205a09a3c3fd68b14138f0;p=kdenlive diff --git a/src/kthumb.h b/src/kthumb.h index f249b071..a0255210 100644 --- a/src/kthumb.h +++ b/src/kthumb.h @@ -1,5 +1,5 @@ /*************************************************************************** - krender.h - description + kthumb.h - description ------------------- begin : Fri Nov 22 2002 copyright : (C) 2002 by Jason Wood @@ -27,6 +27,7 @@ #include + /**KRender encapsulates the client side of the interface to a renderer. From Kdenlive's point of view, you treat the KRender object as the renderer, and simply use it as if it was local. Calls are asyncrhonous - @@ -37,61 +38,67 @@ relevant signal that get's emitted once the call completes. namespace Mlt { - class Miracle; - class Consumer; - class Producer; - class Frame; - class Profile; +class Miracle; +class Consumer; +class Producer; +class Frame; +class Profile; }; +class ClipManager; + +class MyThread : public QThread { - /* class MyThread : public QThread { +public: + virtual void run(); + void init(QObject *parent, KUrl url, QString target, double frame, double frameLength, int frequency, int channels, int arrayWidth); + bool isWorking(); + bool stop_me; - public: - virtual void run(); - void init(KUrl url, QString target, double frame, double frameLength, int frequency, int channels, int arrayWidth); - bool isWorking(); - bool stop_me; +private: + QFile f; + KUrl m_url; + double m_frame; + double m_frameLength; + int m_frequency; + int m_channels; + int m_arrayWidth; + bool m_isWorking; + QObject *m_parent; +}; - private: - QFile f; - KUrl m_url; - double m_frame; - double m_frameLength; - int m_frequency; - int m_channels; - int m_arrayWidth; - bool m_isWorking; - }; -*/ -class KThumb:public QObject { - Q_OBJECT public: +class KThumb: public QObject { +Q_OBJECT public: - KThumb(KUrl url, int width, int height, QObject * parent = 0, const char *name = 0); + KThumb(ClipManager *clipManager, KUrl url, int width, int height, QObject * parent = 0, const char *name = 0); ~KThumb(); public slots: - void extractImage( int frame, int frame2); - static QPixmap getImage(KUrl url, int width, int height); -/* void getImage(KUrl url, int frame, int width, int height); - void getThumbs(KUrl url, int startframe, int endframe, int width, int height); - void stopAudioThumbs(); - void removeAudioThumb(); - void getAudioThumbs(KUrl url, int channel, double frame, double frameLength, int arrayWidth); -*/ + void extractImage(int frame, int frame2); + static QPixmap getImage(KUrl url, int width, int height); + /* void getImage(KUrl url, int frame, int width, int height); + void getThumbs(KUrl url, int startframe, int endframe, int width, int height);*/ + void stopAudioThumbs(); + void removeAudioThumb(); + void getAudioThumbs(int channel, double frame, double frameLength, int arrayWidth); + +protected: + virtual void customEvent(QEvent * event); + private: -// MyThread thumbProducer; - KUrl m_url; - QString m_thumbFile; - int m_width; - int m_height; - Mlt::Profile *m_profile; + MyThread thumbProducer; + KUrl m_url; + QString m_thumbFile; + int m_width; + int m_height; + Mlt::Profile *m_profile; + ClipManager *m_clipManager; signals: - void thumbReady(int frame, QPixmap pm); - void audioThumbReady(QMap >); + void thumbReady(int frame, QPixmap pm); + void audioThumbReady(QMap >); }; #endif