]> git.sesse.net Git - kdenlive/blobdiff - src/docclipbase.h
* Fix crash when deleting clip and audio thumb was being created
[kdenlive] / src / docclipbase.h
index f4f31ce4c888acdc2c8b999c120c101a3eedef90..8e0f6ac452b792b6108786a0cd7625596126bb74 100644 (file)
@@ -83,6 +83,7 @@ Q_OBJECT public:
     /** Returns the internal unique id of the clip. */
     const QString &getId() const;
 
+    bool hasAudioThumb() const;
     //KThumb *thumbCreator;
     bool audioThumbCreated() const;
     /*void getClipMainThumb();*/
@@ -161,15 +162,9 @@ Q_OBJECT public:
      * it uses it as part of it's own composition. */
     bool referencesClip(DocClipBase * clip) const;
 
-    /** Sets the thumbnail to be used by this clip */
-    void setThumbnail(const QPixmap & pixmap);
-
     /** Returns the thumbnail producer used by this clip */
     KThumb *thumbProducer();
 
-    /** Returns the thumbnail used by this clip */
-    const QPixmap & thumbnail() const;
-
     /** Cache for every audio Frame with 10 Bytes */
     /** format is frame -> channel ->bytes */
     QMap<int, QMap<int, QByteArray> > m_audioFrameCache;
@@ -203,7 +198,7 @@ Q_OBJECT public:
     bool hasAudioCodec(const QString &codec) const;
     bool checkHash() const;
     void setPlaceHolder(bool place);
-    QPixmap extractImage(int frame, int width, int height);
+    QImage extractImage(int frame, int width, int height);
     void clearThumbProducer();
     void reloadThumbProducer();
     void cleanupProducers();
@@ -223,9 +218,6 @@ private:   // Private attributes
 
     /** A list of snap markers; these markers are added to a clips snap-to points, and are displayed as necessary. */
     QList < CommentedTime > m_snapMarkers;
-
-    /** A thumbnail for this clip */
-    QPixmap m_thumbnail;
     GenTime m_duration;
 
     KThumb *m_thumbProd;
@@ -248,6 +240,9 @@ private:   // Private attributes
     /** Try to make sure we don't delete a producer while using it */
     QMutex m_producerMutex;
     QMutex m_replaceMutex;
+    
+    /** @brief This timer will trigger creation of audio thumbnails. */
+    QTimer m_audioTimer;
 
     /** Create connections for audio thumbnails */
     void slotRefreshProducer();
@@ -275,7 +270,10 @@ public slots:
     uint getClipThumbFrame() const;
     void setProperties(QMap <QString, QString> properties);
     void setMetadata(QMap <QString, QString> properties);
+    /** Returns all current properties for this clip */
     QMap <QString, QString> properties() const;
+    /** Return the current values for a set of properties */
+    QMap <QString, QString> currentProperties(QMap <QString, QString> props);
     QMap <QString, QString> metadata() const;
     void slotExtractImage(QList <int> frames);