diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-25 14:19:11 (GMT) |
---|---|---|
committer | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-25 14:19:11 (GMT) |
commit | f3defb60f21cfe2456ace1148afcce43112f9c51 (patch) | |
tree | 1f7420f2b83eff53615f4b427f4f19a0b6f34b7b /src/3rdparty/phonon/mmf/mediaobject.cpp | |
parent | 9bcdcc33e1abd202a5b0ec156ff22624bd21740c (diff) | |
download | Qt-f3defb60f21cfe2456ace1148afcce43112f9c51.zip Qt-f3defb60f21cfe2456ace1148afcce43112f9c51.tar.gz Qt-f3defb60f21cfe2456ace1148afcce43112f9c51.tar.bz2 |
Added some missing signals in MediaObject; fixed seek slider in musicplayer.exe
Diffstat (limited to 'src/3rdparty/phonon/mmf/mediaobject.cpp')
-rw-r--r-- | src/3rdparty/phonon/mmf/mediaobject.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp index fec5441..396f658 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.cpp +++ b/src/3rdparty/phonon/mmf/mediaobject.cpp @@ -156,6 +156,11 @@ void MMF::MediaObject::stop() void MMF::MediaObject::seek(qint64 ms) { m_player->seek(ms); + + if(state() == PausedState or state() == PlayingState) + { + emit tick(currentTime()); + } } qint32 MMF::MediaObject::tickInterval() const @@ -215,6 +220,8 @@ void MMF::MediaObject::setSource(const MediaSource &source) // This is a hack to work around KErrInUse from MMF client utility // OpenFileL calls m_player->setFileSource(source, m_file); + + emit currentSourceChanged(source); } void MMF::MediaObject::createPlayer(const MediaSource &source) @@ -227,6 +234,9 @@ void MMF::MediaObject::createPlayer(const MediaSource &source) AbstractPlayer* oldPlayer = m_player.data(); + const bool oldPlayerHasVideo = oldPlayer->hasVideo(); + const bool oldPlayerSeekable = oldPlayer->isSeekable(); + // Determine media type switch(source.type()) { @@ -313,11 +323,21 @@ void MMF::MediaObject::createPlayer(const MediaSource &source) m_player.reset(newPlayer); - connect(m_player.data(), SIGNAL(totalTimeChanged()), SIGNAL(totalTimeChanged())); + 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))); + if(oldPlayerHasVideo != hasVideo()) + { + emit hasVideoChanged(hasVideo()); + } + + if(oldPlayerSeekable != isSeekable()) + { + emit seekableChanged(isSeekable()); + } + TRACE_EXIT_0(); } |