summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/abstractmediaplayer.h
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-12-01 17:55:30 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-01-11 13:41:32 (GMT)
commitb0da36d29288d8ce2d5417c6054373986ed272fa (patch)
tree30c60b60f2844a4663a2c8bbe3e226d48e016257 /src/3rdparty/phonon/mmf/abstractmediaplayer.h
parent73e4b0fdd430048dc32516031c5a1fe112ef6cbf (diff)
downloadQt-b0da36d29288d8ce2d5417c6054373986ed272fa.zip
Qt-b0da36d29288d8ce2d5417c6054373986ed272fa.tar.gz
Qt-b0da36d29288d8ce2d5417c6054373986ed272fa.tar.bz2
Implemented buffer status notifications in Phonon MMF backend
When clips are buffering (either at the start of playback, or during playback, when buffer levels drop due to e.g. CPU, file system or network load), the backend receives notification from the MMF. While buffering is ongoing, the backend periodically queries the filling status and emits a signal. Task-number: QTBUG-4660 Reviewed-by: Frans Englich (cherry picked from commit bed33ac62d87073120d56ff75a3d2356c99c64ea)
Diffstat (limited to 'src/3rdparty/phonon/mmf/abstractmediaplayer.h')
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
index 0432b07..7c11ec7 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
@@ -69,6 +69,7 @@ protected:
virtual int setDeviceVolume(int mmfVolume) = 0;
virtual int openFile(RFile& file) = 0;
virtual int openUrl(const QString& url) = 0;
+ virtual int bufferStatus() const = 0;
virtual void close() = 0;
virtual void changeState(PrivateState newState);
@@ -77,21 +78,22 @@ protected:
virtual QPair<QString, QString> metaDataEntry(int index) const = 0;
protected:
- bool tickTimerRunning() const;
- void startTickTimer();
- void stopTickTimer();
+ void bufferingStarted();
+ void bufferingComplete();
void maxVolumeChanged(int maxVolume);
-
static qint64 toMilliSeconds(const TTimeIntervalMicroSeconds &);
private:
+ void startPositionTimer();
+ void stopPositionTimer();
+ void startBufferStatusTimer();
+ void stopBufferStatusTimer();
+ void stopTimers();
void doVolumeChanged();
private Q_SLOTS:
- /**
- * Receives signal from m_tickTimer
- */
- void tick();
+ void positionTick();
+ void bufferStatusTick();
private:
/**
@@ -101,7 +103,10 @@ private:
*/
bool m_playPending;
- QScopedPointer<QTimer> m_tickTimer;
+ QScopedPointer<QTimer> m_positionTimer;
+
+ QScopedPointer<QTimer> m_bufferStatusTimer;
+ PrivateState m_stateBeforeBuffering;
int m_mmfMaxVolume;