#include <QFuture>
#include <KUrl>
+#include <kdeversion.h>
#include <mlt++/Mlt.h>
void updateThumbUrl(const QString &hash);
void extractImage(int frame, int frame2);
QPixmap extractImage(int frame, int width, int height);
+#if KDE_IS_VERSION(4,5,0)
+ /** @brief Request thumbnails for the frame range. */
+ void queryIntraThumbs(int start, int end);
+ /** @brief Query cached thumbnail. */
+ QImage findCachedThumb(const QString path);
+#endif
public slots:
void updateClipUrl(KUrl url, const QString &hash);
private slots:
void slotAudioThumbOver();
void slotCreateAudioThumbs();
+#if KDE_IS_VERSION(4,5,0)
+ /** @brief Fetch all requested frames. */
+ void slotGetIntraThumbs();
+#endif
private:
QFuture<void> m_audioThumbProducer;
ClipManager *m_clipManager;
QString m_id;
QList <int> m_requestedThumbs;
+ /** @brief Controls the thumbnails process. */
QFuture<void> m_future;
+ /** @brief Controls the intra frames thumbnails process (cached thumbnails). */
+ QFuture<void> m_intra;
QFile m_audioThumbFile;
bool m_stopAudioThumbs;
double m_frame;
int m_frequency;
int m_channels;
int m_arrayWidth;
+ /** @brief List of frame numbers from which we want to extract thumbnails. */
+ QList <int> m_intraFramesQueue;
void doGetThumbs();
signals:
void thumbReady(int, QImage);
void mainThumbReady(const QString &, QPixmap);
void audioThumbReady(QMap <int, QMap <int, QByteArray> >);
+ /** @brief We have finished caching all requested thumbs. */
+ void thumbsCached();
};
#endif