summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-04-14 11:14:32 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-04-15 05:39:53 (GMT)
commit0fa644049f3a864df4c1ffa47efd16d7d0c81cf3 (patch)
treed9b809ede45d69718119c17c38449b5634a498ee /src
parent430718023edfe83b4e028d97c1a57fd0cdbbdace (diff)
downloadQt-0fa644049f3a864df4c1ffa47efd16d7d0c81cf3.zip
Qt-0fa644049f3a864df4c1ffa47efd16d7d0c81cf3.tar.gz
Qt-0fa644049f3a864df4c1ffa47efd16d7d0c81cf3.tar.bz2
Phonon MMF: Emit prefinishMarkReached(), finished() signals
Fixes testPrefinishMark step in tst_mediaobject. Task-number: QTBUG-9339 Reviewed-by: Frans Englich
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.cpp1
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.cpp16
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.h3
3 files changed, 18 insertions, 2 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
index 6356c21..a90131d 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
@@ -386,6 +386,7 @@ void MMF::AbstractMediaPlayer::playbackComplete(int error)
}
else {
setError(tr("Playback complete"), error);
+ emit finished();
}
}
diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp
index ee459e6..f881da0 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.cpp
+++ b/src/3rdparty/phonon/mmf/mediaobject.cpp
@@ -323,11 +323,11 @@ void MMF::MediaObject::createPlayer(const MediaSource &source)
connect(m_player.data(), SIGNAL(totalTimeChanged(qint64)), SIGNAL(totalTimeChanged(qint64)));
connect(m_player.data(), SIGNAL(stateChanged(Phonon::State,Phonon::State)), SIGNAL(stateChanged(Phonon::State,Phonon::State)));
connect(m_player.data(), SIGNAL(finished()), SIGNAL(finished()));
- connect(m_player.data(), SIGNAL(tick(qint64)), SIGNAL(tick(qint64)));
connect(m_player.data(), SIGNAL(bufferStatus(int)), SIGNAL(bufferStatus(int)));
connect(m_player.data(), SIGNAL(metaDataChanged(QMultiMap<QString,QString>)), SIGNAL(metaDataChanged(QMultiMap<QString,QString>)));
connect(m_player.data(), SIGNAL(aboutToFinish()), SIGNAL(aboutToFinish()));
- connect(m_player.data(), SIGNAL(prefinishMarkReached(qint32)), SIGNAL(tick(qint32)));
+ connect(m_player.data(), SIGNAL(prefinishMarkReached(qint32)), SIGNAL(prefinishMarkReached(qint32)));
+ connect(m_player.data(), SIGNAL(prefinishMarkReached(qint32)), SLOT(handlePrefinishMarkReached(qint32)));
// We need to call setError() after doing the connects, otherwise the
// error won't be received.
@@ -414,8 +414,20 @@ void MMF::MediaObject::switchToNextSource()
m_nextSourceSet = false;
switchToSource(m_nextSource);
play();
+ } else {
+ emit finished();
}
}
+//-----------------------------------------------------------------------------
+// Other private functions
+//-----------------------------------------------------------------------------
+
+void MMF::MediaObject::handlePrefinishMarkReached(qint32 time)
+{
+ emit tick(time);
+}
+
+
QT_END_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h
index 62e0a0e..f15eb21 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.h
+++ b/src/3rdparty/phonon/mmf/mediaobject.h
@@ -107,6 +107,9 @@ Q_SIGNALS:
void finished();
void tick(qint64 time);
+private Q_SLOTS:
+ void handlePrefinishMarkReached(qint32);
+
private:
void switchToSource(const MediaSource &source);
void createPlayer(const MediaSource &source);