diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-06-08 14:37:21 +0100 |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-07-07 16:58:14 +0100 |
commit | a1c7b42e8b67e935fe30310af49524a25fa631fc (patch) | |
tree | 1faf6181713af79f2a58276d870f6769340900be /src/3rdparty/phonon/mmf | |
parent | 56a2b6315c44d10f2ca4c76729a53ad9dbed37f9 (diff) | |
download | qt4-tools-a1c7b42e8b67e935fe30310af49524a25fa631fc.tar.gz |
Close media clip before creating new player object
Failure to Close() an existing MMF player utility object before
creating a new one - which happens in the MMF backend's implementation
of Phonon::MediaObject::setCurrentSource() - causes intialization of the
newly-created utility to fail later on.
Task-number: QTBUG-11377
Reviewed-by: Thierry Bastian
Diffstat (limited to 'src/3rdparty/phonon/mmf')
-rw-r--r-- | src/3rdparty/phonon/mmf/abstractmediaplayer.h | 1 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/abstractplayer.h | 1 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/dummyplayer.cpp | 4 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/dummyplayer.h | 1 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mediaobject.cpp | 3 |
5 files changed, 9 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h index 23a8233701..7d28cafee0 100644 --- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h +++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h @@ -71,7 +71,6 @@ protected: virtual int openFile(RFile& file) = 0; virtual int openUrl(const QString& url) = 0; virtual int bufferStatus() const = 0; - virtual void close() = 0; void updateMetaData(); virtual int numberOfMetaDataEntries() const = 0; diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h index ab892f5fc4..30d524377d 100644 --- a/src/3rdparty/phonon/mmf/abstractplayer.h +++ b/src/3rdparty/phonon/mmf/abstractplayer.h @@ -55,6 +55,7 @@ public: AbstractPlayer(const AbstractPlayer *player); virtual void open(const Phonon::MediaSource&, RFile&) = 0; + virtual void close() = 0; // MediaObjectInterface (implemented) qint32 tickInterval() const; diff --git a/src/3rdparty/phonon/mmf/dummyplayer.cpp b/src/3rdparty/phonon/mmf/dummyplayer.cpp index 69700885f0..d39ef76c75 100644 --- a/src/3rdparty/phonon/mmf/dummyplayer.cpp +++ b/src/3rdparty/phonon/mmf/dummyplayer.cpp @@ -97,6 +97,10 @@ void MMF::DummyPlayer::open(const Phonon::MediaSource &, RFile &) } +void MMF::DummyPlayer::close() +{ + +} //----------------------------------------------------------------------------- // AbstractPlayer diff --git a/src/3rdparty/phonon/mmf/dummyplayer.h b/src/3rdparty/phonon/mmf/dummyplayer.h index 6841b5d1a4..9d45696910 100644 --- a/src/3rdparty/phonon/mmf/dummyplayer.h +++ b/src/3rdparty/phonon/mmf/dummyplayer.h @@ -58,6 +58,7 @@ public: // AbstractPlayer virtual void open(const Phonon::MediaSource&, RFile&); + virtual void close(); virtual void doSetTickInterval(qint32 interval); }; } diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp index e1b921b49e..d264377ded 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.cpp +++ b/src/3rdparty/phonon/mmf/mediaobject.cpp @@ -281,6 +281,9 @@ void MMF::MediaObject::createPlayer(const MediaSource &source) break; } + if (oldPlayer) + oldPlayer->close(); + AbstractPlayer* newPlayer = 0; // Construct newPlayer using oldPlayer (if not 0) in order to copy |