summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/abstractmediaplayer.h
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-12-02 16:20:00 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-12-08 13:07:30 (GMT)
commit89e1e7fcbcbe93d8096afe0f7c240fe706cc9069 (patch)
tree2e47fde0386d04d42d6aadf09c824ea10b72da5f /src/3rdparty/phonon/mmf/abstractmediaplayer.h
parent946dede337f0a43ccb394c10aa2045bc9ef59301 (diff)
downloadQt-89e1e7fcbcbe93d8096afe0f7c240fe706cc9069.zip
Qt-89e1e7fcbcbe93d8096afe0f7c240fe706cc9069.tar.gz
Qt-89e1e7fcbcbe93d8096afe0f7c240fe706cc9069.tar.bz2
Implemented support for playlist handling in Phonon MMF backend
The main changes are: 1. MediaObject emits prefinishMark at the appropriate instant 2. MediaObject emits aboutToFinish at the appropriate instant 3. MediaObject switches to next source when playback completes Task-number: QTBUG-6214 Reviewed-by: Frans Englich
Diffstat (limited to 'src/3rdparty/phonon/mmf/abstractmediaplayer.h')
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
index 7c11ec7..24fa228 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
@@ -33,6 +33,7 @@ namespace Phonon
namespace MMF
{
class AudioOutput;
+class MediaObject;
/**
* Interface via which MMF client APIs for both audio and video can be
@@ -43,19 +44,17 @@ class AbstractMediaPlayer : public AbstractPlayer
Q_OBJECT
protected:
- AbstractMediaPlayer();
- explicit AbstractMediaPlayer(const AbstractPlayer& player);
+ AbstractMediaPlayer(MediaObject *parent, const AbstractPlayer *player);
public:
+ virtual void open(const Phonon::MediaSource&, RFile&);
+
// MediaObjectInterface
virtual void play();
virtual void pause();
virtual void stop();
virtual void seek(qint64 milliseconds);
virtual bool isSeekable() const;
- virtual MediaSource source() const;
- virtual void setFileSource(const Phonon::MediaSource&, RFile&);
- virtual void setNextSource(const MediaSource &source);
virtual void volumeChanged(qreal volume);
protected:
@@ -81,6 +80,8 @@ protected:
void bufferingStarted();
void bufferingComplete();
void maxVolumeChanged(int maxVolume);
+ void playbackComplete(int error);
+
static qint64 toMilliSeconds(const TTimeIntervalMicroSeconds &);
private:
@@ -96,6 +97,8 @@ private Q_SLOTS:
void bufferStatusTick();
private:
+ MediaObject *const m_parent;
+
/**
* This flag is set to true if play is called when the object is
* in a Loading state. Once loading is complete, playback will
@@ -110,8 +113,8 @@ private:
int m_mmfMaxVolume;
- MediaSource m_source;
- MediaSource m_nextSource;
+ bool m_prefinishMarkSent;
+ bool m_aboutToFinishSent;
QMultiMap<QString, QString> m_metaData;