From: Jean-Baptiste Mardelle Date: Thu, 13 Oct 2011 21:50:24 +0000 (+0000) Subject: Fix audio thumbs runtime warning X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=201f0e8a9ff002326bc1e3d66fc287edaf7807b0;p=kdenlive Fix audio thumbs runtime warning svn path=/trunk/kdenlive/; revision=5963 --- diff --git a/src/definitions.h b/src/definitions.h index b01ef370..1a3a2557 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -70,6 +70,7 @@ struct TrackInfo { }; typedef QMap stringMap; +typedef QMap > audioByteArray; struct ItemInfo { /** startPos is the position where the clip starts on the track */ diff --git a/src/docclipbase.cpp b/src/docclipbase.cpp index fc45161a..70da2394 100644 --- a/src/docclipbase.cpp +++ b/src/docclipbase.cpp @@ -120,7 +120,7 @@ QPoint DocClipBase::zone() const void DocClipBase::slotCreateAudioTimer() { - connect(m_thumbProd, SIGNAL(audioThumbReady(QMap >)), this , SLOT(updateAudioThumbnail(QMap >))); + 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 > data) +void DocClipBase::updateAudioThumbnail(const audioByteArray& data) { //kDebug() << "CLIPBASE RECIEDVED AUDIO DATA*********************************************"; m_audioFrameCache = data; diff --git a/src/docclipbase.h b/src/docclipbase.h index b23945dc..f44130e1 100644 --- a/src/docclipbase.h +++ b/src/docclipbase.h @@ -256,7 +256,7 @@ private: // Private attributes public slots: - void updateAudioThumbnail(QMap > data); + void updateAudioThumbnail(const audioByteArray& data); bool slotGetAudioThumbs(); QList < CommentedTime > commentedSnapMarkers() const; GenTime findNextSnapMarker(const GenTime & currTime); diff --git a/src/kthumb.cpp b/src/kthumb.cpp index 56ec4a5e..a7950b2a 100644 --- a/src/kthumb.cpp +++ b/src/kthumb.cpp @@ -350,7 +350,7 @@ void KThumb::getAudioThumbs(int channel, double frame, double frameLength, int a return; } - QMap > storeIn; + audioByteArray storeIn; //FIXME: Hardcoded!!! m_frequency = 48000; m_channels = channel; diff --git a/src/kthumb.h b/src/kthumb.h index 45eca383..8214625b 100644 --- a/src/kthumb.h +++ b/src/kthumb.h @@ -49,6 +49,8 @@ class Profile; class ClipManager; +typedef QMap > 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 >); + void audioThumbReady(const audioByteArray&); /** @brief We have finished caching all requested thumbs. */ void thumbsCached(); }; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 69b88a59..ad341f38 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -130,6 +130,7 @@ class Producer; Q_DECLARE_METATYPE(QVector) + EffectsList MainWindow::videoEffects; EffectsList MainWindow::audioEffects; EffectsList MainWindow::customEffects; @@ -150,6 +151,8 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString & { qRegisterMetaType > (); qRegisterMetaType ("stringMap"); + qRegisterMetaType ("audioByteArray"); + // Init locale QLocale systemLocale = QLocale(); systemLocale.setNumberOptions(QLocale::OmitGroupSeparator);