]> git.sesse.net Git - kdenlive/blob - src/kthumb.h
More work on timeline widget
[kdenlive] / src / kthumb.h
1 /***************************************************************************
2                          krender.h  -  description
3                             -------------------
4    begin                : Fri Nov 22 2002
5    copyright            : (C) 2002 by Jason Wood
6    email                : jasonwood@blueyonder.co.uk
7 ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
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.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 #ifndef KTHUMB_H
19 #define KTHUMB_H
20
21 #include <qobject.h>
22 #include <qpixmap.h>
23 #include <qfile.h>
24 #include <qthread.h>
25
26 #include <kurl.h>
27
28
29 /**KRender encapsulates the client side of the interface to a renderer.
30 From Kdenlive's point of view, you treat the KRender object as the
31 renderer, and simply use it as if it was local. Calls are asyncrhonous -
32 you send a call out, and then recieve the return value through the
33 relevant signal that get's emitted once the call completes.
34   *@author Jason Wood
35   */
36
37
38 namespace Mlt {
39     class Miracle;
40     class Consumer;
41     class Producer;
42     class Frame;
43 };
44
45
46   /*  class MyThread : public QThread {
47
48     public:
49         virtual void run();
50         void init(KUrl url, QString target, double frame, double frameLength, int frequency, int channels, int arrayWidth);
51         bool isWorking();
52         bool stop_me;
53
54     private:
55         QFile f;
56         KUrl m_url;
57         double m_frame;
58         double m_frameLength;
59         int m_frequency;
60         int m_channels;
61         int m_arrayWidth;
62         bool m_isWorking;
63     };
64
65 */
66 class KThumb:public QObject {
67   Q_OBJECT public:
68
69
70      KThumb(KUrl url, QObject * parent = 0, const char *name = 0);
71     ~KThumb();
72
73 public slots:
74         void extractImage( int frame, int frame2, int width, int height);
75 /*      void getImage(KUrl url, int frame, int width, int height);
76         void getThumbs(KUrl url, int startframe, int endframe, int width, int height);
77         void stopAudioThumbs();
78         void removeAudioThumb();
79         void getAudioThumbs(KUrl url, int channel, double frame, double frameLength, int arrayWidth);
80 */
81 private:
82 //      MyThread thumbProducer;
83         KUrl m_url;
84         QString m_thumbFile;
85
86 signals:
87         void thumbReady(int frame, QPixmap pm);
88         void audioThumbReady(QMap <int, QMap <int, QByteArray> >);
89 };
90
91 #endif