summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/phonon/mmf')
-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);