]> git.sesse.net Git - kdenlive/blobdiff - src/clipmanager.h
* Fix crash when deleting clip and audio thumb was being created
[kdenlive] / src / clipmanager.h
index 7f1622e33c48f3fba9e3aa948a285a3130fce51a..169341a065e0d3e31c8ce728dcc026bbb6b9dfde 100644 (file)
@@ -98,8 +98,6 @@ Q_OBJECT public:
     int getFreeClipId();
     int getFreeFolderId();
     int lastClipId() const;
-    void startAudioThumbsGeneration();
-    void endAudioThumbsGeneration(const QString &requestedId);
     void askForAudioThumb(const QString &id);
     QString projectFolder() const;
     void clearUnusedProducers();
@@ -129,6 +127,7 @@ private slots:
     /** Check the list of externally modified clips, and process them if they were not modified in the last 1500 milliseconds */
     void slotProcessModifiedClips();
     void slotGetThumbs();
+    void slotGetAudioThumbs();
 
 private:   // Private attributes
     /** the list of clips in the document */
@@ -141,7 +140,6 @@ private:   // Private attributes
     KdenliveDoc *m_doc;
     int m_clipIdCounter;
     int m_folderIdCounter;
-    QString m_generatingAudioId;
     KDirWatch m_fileWatcher;
     /** Timer used to reload clips when they have been externally modified */
     QTimer m_modifiedTimer;
@@ -155,6 +153,11 @@ private:   // Private attributes
     bool m_abortThumb;
     /** @brief We are about to delete the clip producer, stop processing thumbs. */
     bool m_closing;
+    QFuture<void> m_audioThumbsThread;
+    /** @brief If true, abort processing of audio thumbs. */
+    bool m_abortAudioThumb;
+    /** @brief The id of currently processed clip for audio thumbs creation. */
+    QString m_processingAudioThumbId;
 
 signals:
     void reloadClip(const QString &);