]> git.sesse.net Git - kdenlive/commitdiff
Fix audio thumbs runtime warning
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 13 Oct 2011 21:50:24 +0000 (21:50 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 13 Oct 2011 21:50:24 +0000 (21:50 +0000)
svn path=/trunk/kdenlive/; revision=5963

src/definitions.h
src/docclipbase.cpp
src/docclipbase.h
src/kthumb.cpp
src/kthumb.h
src/mainwindow.cpp

index b01ef370b1c25df5667f28d3a85abf8fb85bb525..1a3a255769ca9f47a027050d24c3c213173eb6f7 100644 (file)
@@ -70,6 +70,7 @@ struct TrackInfo {
 };
 
 typedef QMap<QString, QString> stringMap;
+typedef QMap <int, QMap <int, QByteArray> > audioByteArray;
 
 struct ItemInfo {
     /** startPos is the position where the clip starts on the track */
index fc45161ae6ab79b8f804c23846154644532c920b..70da2394836abdd013dfbf504887e6cf5ef27cf8 100644 (file)
@@ -120,7 +120,7 @@ QPoint DocClipBase::zone() const
 
 void DocClipBase::slotCreateAudioTimer()
 {
-    connect(m_thumbProd, SIGNAL(audioThumbReady(QMap <int, QMap <int, QByteArray> >)), this , SLOT(updateAudioThumbnail(QMap <int, QMap <int, QByteArray> >)));
+    connect(m_thumbProd, SIGNAL(audioThumbReady(const audioByteArray&)), this , SLOT(updateAudioThumbnail(const audioByteArray&)));
     m_audioTimer = new QTimer(this);
     connect(m_audioTimer, SIGNAL(timeout()), this, SLOT(slotGetAudioThumbs()));
 }
@@ -286,7 +286,7 @@ const QPixmap & DocClipBase::thumbnail() const
     return m_thumbnail;
 }
 
-void DocClipBase::updateAudioThumbnail(QMap<int, QMap<int, QByteArray> > data)
+void DocClipBase::updateAudioThumbnail(const audioByteArray& data)
 {
     //kDebug() << "CLIPBASE RECIEDVED AUDIO DATA*********************************************";
     m_audioFrameCache = data;
index b23945dc7ba8675046803511a7f1e99de0258a44..f44130e172932af66ab15c9985ee78bcc9a5dda5 100644 (file)
@@ -256,7 +256,7 @@ private:   // Private attributes
 
    
 public slots:
-    void updateAudioThumbnail(QMap<int, QMap<int, QByteArray> > data);
+    void updateAudioThumbnail(const audioByteArray& data);
     bool slotGetAudioThumbs();
     QList < CommentedTime > commentedSnapMarkers() const;
     GenTime findNextSnapMarker(const GenTime & currTime);
index 56ec4a5ed7080cf654b259d4f53a63a12e14496c..a7950b2ae061aa4c5f40f511763c4e3749c10880 100644 (file)
@@ -350,7 +350,7 @@ void KThumb::getAudioThumbs(int channel, double frame, double frameLength, int a
         return;
     }
 
-    QMap <int, QMap <int, QByteArray> > storeIn;
+    audioByteArray storeIn;
     //FIXME: Hardcoded!!!
     m_frequency = 48000;
     m_channels = channel;
index 45eca383aec534ffadc9fcb332b9b563387cd923..8214625bbb2e54d4ebab3d922f3e7484833422f6 100644 (file)
@@ -49,6 +49,8 @@ class Profile;
 
 class ClipManager;
 
+typedef QMap <int, QMap <int, QByteArray> > audioByteArray;
+
 class KThumb: public QObject
 {
 Q_OBJECT public:
@@ -124,7 +126,7 @@ private:
 signals:
     void thumbReady(int, QImage);
     void mainThumbReady(const QString &, QPixmap);
-    void audioThumbReady(QMap <int, QMap <int, QByteArray> >);
+    void audioThumbReady(const audioByteArray&);
     /** @brief We have finished caching all requested thumbs. */
     void thumbsCached();
 };
index 69b88a599cb08ab680f01a3a813e9d608b6eff3f..ad341f384bf37bf59662f8a8728a23fe6af078a3 100644 (file)
@@ -130,6 +130,7 @@ class Producer;
 
 Q_DECLARE_METATYPE(QVector<int16_t>)
 
+
 EffectsList MainWindow::videoEffects;
 EffectsList MainWindow::audioEffects;
 EffectsList MainWindow::customEffects;
@@ -150,6 +151,8 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
 {   
     qRegisterMetaType<QVector<int16_t> > ();
     qRegisterMetaType<stringMap> ("stringMap");
+    qRegisterMetaType<audioByteArray> ("audioByteArray");
+
     // Init locale
     QLocale systemLocale = QLocale();
     systemLocale.setNumberOptions(QLocale::OmitGroupSeparator);