1 /***************************************************************************
4 begin : Fri Nov 22 2002
5 copyright : (C) 2002 by Jason Wood
6 email : jasonwood@blueyonder.co.uk
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
28 #include <mlt++/Mlt.h>
31 /**KRender encapsulates the client side of the interface to a renderer.
32 From Kdenlive's point of view, you treat the KRender object as the
33 renderer, and simply use it as if it was local. Calls are asyncrhonous -
34 you send a call out, and then recieve the return value through the
35 relevant signal that get's emitted once the call completes.
50 class MyThread : public QThread {
54 void init(QObject *parent, KUrl url, QString target, double frame, double frameLength, int frequency, int channels, int arrayWidth);
71 class KThumb: public QObject {
75 KThumb(ClipManager *clipManager, KUrl url, QObject * parent = 0, const char *name = 0);
77 void setProducer(Mlt::Producer *producer);
80 void extractImage(int frame, int frame2);
81 void updateClipUrl(KUrl url);
82 static QPixmap getImage(KUrl url, int width, int height);
83 static QPixmap getImage(QDomElement xml, int frame, int width, int height);
84 /* void getImage(KUrl url, int frame, int width, int height);
85 void getThumbs(KUrl url, int startframe, int endframe, int width, int height);*/
86 void stopAudioThumbs();
87 void removeAudioThumb();
88 void getAudioThumbs(int channel, double frame, double frameLength, int arrayWidth);
89 static QPixmap getImage(KUrl url, int frame, int width, int height);
90 static QPixmap getFrame(Mlt::Producer producer, int framepos, int width, int height);
93 virtual void customEvent(QEvent * event);
96 MyThread thumbProducer;
99 Mlt::Profile *m_profile;
100 Mlt::Producer *m_producer;
101 ClipManager *m_clipManager;
104 void thumbReady(int frame, QPixmap pm);
105 void audioThumbReady(QMap <int, QMap <int, QByteArray> >);