X-Git-Url: http://git.maemo.org/git/?p=groove;a=blobdiff_plain;f=mpgplayer.h;fp=mpgplayer.h;h=113e845af864494307f5a13343b19e331021b784;hp=0000000000000000000000000000000000000000;hb=21d90a736479e9eb1615db46297dca25115d5ea0;hpb=eda4383dc1a3011c4c70801cb7ca1692b613141f diff --git a/mpgplayer.h b/mpgplayer.h new file mode 100644 index 0000000..113e845 --- /dev/null +++ b/mpgplayer.h @@ -0,0 +1,56 @@ +#ifndef MPGPLAYER_H +#define MPGPLAYER_H + +#include +//#include +#include +#include "streamio.h" +#include +#include "grooveprogressbar.h" +#include "playlist.h" +#include + +class mpgplayer : public QThread +{ + Q_OBJECT +public: + explicit mpgplayer(QObject *parent = 0); + void play(int p); + void run(); + + void play(); + void stop(); + void pause(); + void setPlaylist(playlist *playList); + ~mpgplayer(); + +signals: + void finishedPlaying(); + void downloadComplete(); +public slots: + void playNext(); + void putb(int p,qint64,qint64); + void abortDownload(); + void back(); +private slots: + void markComplete(); + void updatePlayPosition(qint64 time); +private: + enum status {TWait, TAbort, TFinish, TData}; + status net; + QNetworkAccessManager *manager; + Phonon::AudioOutput *audioOutput; + Phonon::MediaObject *media; + QNetworkReply *reply; + QBuffer *buffer; + Phonon::Path *path; + bool playing; + QObject *internal; + QTime startStreamT; + grooveProgressBar *pd; + playlist *pl; + static const long samplerate = 44100; + +}; + +#endif // MPGPLAYER_H