1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef METADATALOADER_H
- #define METADATALOADER_H
- #include <QObject>
- #include <QTimer>
- #include "metadatavalue.h"
- #include "abstractmetadataloader.h"
- namespace TagLib {
- //start
- /** Loads metadata from mp3 files using TagLib 1.6.3.
- http://developer.kde.org/~wheeler/taglib.html.
- Tested on linux and windows. Much faster than the mobility version.
- Known issues: sometimes reports 0 for track time?
- */
- class MetaDataLoader : public Abstract::MetaDataLoader {
- Q_OBJECT
- public:
- typedef Abstract::MetaDataLoader SUPER;
- explicit MetaDataLoader(QObject *parent = 0);
- static MetaDataLoader* instance();
- virtual ~MetaDataLoader() {}
- const QStringList &supportedExtensions() ;
- /** non-blocking method that fetches metadata.
- A fetched() signal is emitted when metadata is ready.
- */
- MetaDataLoader* clone(QObject *parent) ;
- void get(QUrl url);
- void get(QList<QUrl> urls);
- bool isRunning() const {return m_running;}
- public slots:
- void cancel();
- private slots:
- void checkForWork();
- private:
- bool m_running;
- bool m_canceled;
- int m_processingMax;
- QList<QUrl> m_queue;
- QTimer m_timer;
- };
- }
- //end
- #endif // METADATALOADER_H
|