summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-06-08 13:37:21 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-07-07 12:21:25 (GMT)
commit50fbb9d19b3f524361c146de8ff0fb2fe6abacc9 (patch)
tree747739b75b1cac36b3f483972ca0f9a1ff6529d0 /src
parent80af9a7b09b531a849b863695b244dd1df7dfb1d (diff)
downloadQt-50fbb9d19b3f524361c146de8ff0fb2fe6abacc9.zip
Qt-50fbb9d19b3f524361c146de8ff0fb2fe6abacc9.tar.gz
Qt-50fbb9d19b3f524361c146de8ff0fb2fe6abacc9.tar.bz2
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')
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.cpp4
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.cpp3
5 files changed, 9 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
index 23a8233..7d28caf 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 ab892f5..30d5243 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 6970088..d39ef76 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 6841b5d..9d45696 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 e1b921b..d264377 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