X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fclipmanager.h;h=a3787c0f329b6b4f1a3ca4a94326d58d35ef3eb5;hb=20d22f3c3f5bf0dbd586f7098093c6d4c5a6def0;hp=f9ac1722b27b2b56e0be1e91e1c852e9bb25b3dd;hpb=ecda842bf2b632f75198d6cf0fac1fcb5ef862ad;p=kdenlive diff --git a/src/clipmanager.h b/src/clipmanager.h index f9ac1722..a3787c0f 100644 --- a/src/clipmanager.h +++ b/src/clipmanager.h @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include #include @@ -70,22 +72,22 @@ Q_OBJECT public: * @param url file to add * @param group name of the group to insert the file in (can be empty) * @param groupId id of the group (if any) */ - void slotAddClipFile(const KUrl url, const QString group, const QString &groupId); + void slotAddClipFile(const KUrl &url, const QString &group, const QString &groupId); /** @brief Adds a list of files to the project. * @param urls files to add * @param group name of the group to insert the files in (can be empty) * @param groupId id of the group (if any) * It checks for duplicated items and asks to the user for instructions. */ - void slotAddClipList(const KUrl::List urls, const QString group, const QString &groupId); - void slotAddTextClipFile(const QString titleName, int out, const QString xml, const QString group, const QString &groupId); - void slotAddTextTemplateClip(QString titleName, const KUrl path, const QString group, const QString &groupId); - void slotAddXmlClipFile(const QString name, const QDomElement xml, const QString group, const QString &groupId); - void slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group, const QString &groupId); - void slotAddSlideshowClipFile(const QString name, const QString path, int count, const QString duration, + void slotAddClipList(const KUrl::List urls, const QString &group, const QString &groupId); + void slotAddTextClipFile(const QString &titleName, int out, const QString &xml, const QString &group, const QString &groupId); + void slotAddTextTemplateClip(QString titleName, const KUrl &path, const QString &group, const QString &groupId); + void slotAddXmlClipFile(const QString &name, const QDomElement &xml, const QString &group, const QString &groupId); + void slotAddColorClipFile(const QString &name, const QString &color, QString duration, const QString &group, const QString &groupId); + void slotAddSlideshowClipFile(const QString &name, const QString &path, int count, const QString &duration, const bool loop, const bool crop,const bool fade, const QString &luma_duration, const QString &luma_file, const int softness, - const QString &animation, const QString group, const QString &groupId); + const QString &animation, const QString &group, const QString &groupId); DocClipBase *getClipById(QString clipId); const QList getClipByResource(QString resource); void slotDeleteClips(QStringList ids); @@ -105,10 +107,15 @@ Q_OBJECT public: void addFolder(const QString&, const QString&); void deleteFolder(const QString&); void clear(); + void clearCache(); AbstractGroupItem *createGroup(); void removeGroup(AbstractGroupItem *group); QDomElement groupsXml() const; int clipsCount() const; + /** @brief Request creation of a clip thumbnail for specified frames. */ + void requestThumbs(const QString id, QList frames); + /** @brief remove a clip id from the queue list. */ + void stopThumbs(const QString &id); #if KDE_IS_VERSION(4,5,0) KImageCache* pixmapCache; @@ -121,6 +128,7 @@ private slots: void slotClipAvailable(const QString &path); /** Check the list of externally modified clips, and process them if they were not modified in the last 1500 milliseconds */ void slotProcessModifiedClips(); + void slotGetThumbs(); private: // Private attributes /** the list of clips in the document */ @@ -139,6 +147,14 @@ private: // Private attributes QTimer m_modifiedTimer; /** List of the clip IDs that need to be reloaded after being externally modified */ QMap m_modifiedClips; + /** Struct containing the list of clip thumbnails to request (clip id and frames) */ + QMap m_requestedThumbs; + QMutex m_thumbsMutex; + QFuture m_thumbsThread; + /** @brief If true, abort processing of clip thumbs before removing a clip. */ + bool m_abortThumb; + /** @brief We are about to delete the clip producer, stop processing thumbs. */ + bool m_closing; signals: void reloadClip(const QString &);