Changed media player to initialize in boot.
[jspeed] / src / mediaplayer.h
index abd3303..9a9e376 100644 (file)
 #define MEDIAPLAYER_H
 
 #include <QtCore/QString>
+#include <QtCore/QStringList>
 #include <QtCore/QList>
-#include <QMediaPlayer>
+
+class QMediaPlayer;
 
 class MediaPlayer
 {
 public:
     enum Format {MP3, WAV, AAC, FORMAT_COUNT};
+    static void init();
     static bool play(QString const& file);
     static void getSupportedFormats(QList<QString>& formats);
     static QString getFormatPattern();
+    static QStringList getFormatPatterns();
     static QString getSoundDir();
     static QString const& getLocalSoundDir();
 
 private:
-    static QMediaPlayer player_;
+    static QMediaPlayer* getPlayer();
 };
 
 #endif