1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #ifndef METADATALOADER_H
- #define METADATALOADER_H
- #include <QObject>
- #include <QTimer>
- #include "metadatavalue.h"
- #include <QMediaPlayer>
- #include "abstractmetadataloader.h"
- namespace Mobility {
- /** Metadataloader using multimediakit from Qt Mobility 1.1.1
- Known issues: Does not read id3 tags from mp3s on windows due to backend limitations.
- Tested on Linux and Symbian.
- */
- class MetaDataLoader : public Abstract::MetaDataLoader {
- Q_OBJECT
- public:
- explicit MetaDataLoader(QObject* parent = 0);
- static MetaDataLoader* instance();
- const QStringList& supportedExtensions();
- /** non-blocking interface results in a fetched()
- at some future time if successful.
- failed() is called if not.
- @param fileName absolute file path
- */
- virtual void get(QUrl url);
- void get(QList<QUrl> fns);
- MetaDataLoader* clone(QObject *parent);
- bool isRunning() const;
- signals:
- public slots:
- void checkForWork();
- void cancel();
- void timeOutSlot();
- private slots:
- void fetch();
- void failed();
- private:
- QTimer m_timer;
- QTimer m_timeOut;
- bool m_isRunning;
- bool m_fetched;
- bool m_cancelled;
- QMediaPlayer* m_player;
- QList<QUrl> m_queue;
- MetaDataValue m_current;
- };
- }
- #endif // METADATALOADER_H
|