From 91ba0239bcaca91e5d07b685e53ecd3ce13d58ba Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 31 Mar 2010 13:46:10 +0100 Subject: Remove compiler warning RVCT complains that a non-POD type (VideoParameters) is passed through the TRACE_ENTRY ellipsis, when building in debug mode. Reviewed-by: trustme --- src/3rdparty/phonon/mmf/videoplayer_dsa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp b/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp index 226d079cb2..d607f1d39b 100644 --- a/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp +++ b/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp @@ -217,7 +217,7 @@ void getDsaRegion(RWsSession &session, const RWindowBase &window) void MMF::DsaVideoPlayer::handleParametersChanged(VideoParameters parameters) { TRACE_CONTEXT(DsaVideoPlayer::handleParametersChanged, EVideoInternal); - TRACE_ENTRY("parameters 0x%x", parameters); + TRACE_ENTRY("parameters 0x%x", parameters.operator int()); if (!m_window) return; -- cgit v1.2.3 From 6ac2419622eadb54c86e24c6a57824c7f78b07ac Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 31 Mar 2010 13:49:35 +0100 Subject: Ensure Phonon MMF backend emits aboutToFinish It seems that, after a call to CMdaAudioPlayerUtility::SetPosition, the reported position values are slightly lower than they should be. This, combined with the fact that the backend emitted aboutToFinish from its timer tick slot, means that the aboutToFinish signal is sometimes not emitted at the end of an audio clip, if the position has been advanced by seeking during playback. This patch adds a check in the implementation of the MMdaAudioPlayerCallback::MapcPlayComplete callback - if, at this point, aboutToFinish has not been emitted, it is emitted now. Task-number: QTBUG-9368 Reviewed-by: trustme --- src/3rdparty/phonon/mmf/abstractmediaplayer.cpp | 13 +++++++++---- src/3rdparty/phonon/mmf/abstractmediaplayer.h | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp index 544762aa11..6356c21dd5 100644 --- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp +++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp @@ -369,6 +369,13 @@ void MMF::AbstractMediaPlayer::playbackComplete(int error) { stopTimers(); + if (KErrNone == error && !m_aboutToFinishSent) { + const qint64 total = totalTime(); + emit MMF::AbstractPlayer::tick(total); + m_aboutToFinishSent = true; + emit aboutToFinish(); + } + if (KErrNone == error) { changeState(StoppedState); @@ -393,15 +400,13 @@ qint64 MMF::AbstractMediaPlayer::toMilliSeconds(const TTimeIntervalMicroSeconds void MMF::AbstractMediaPlayer::positionTick() { - emitMarksIfReached(); - const qint64 current = currentTime(); + emitMarksIfReached(current); emit MMF::AbstractPlayer::tick(current); } -void MMF::AbstractMediaPlayer::emitMarksIfReached() +void MMF::AbstractMediaPlayer::emitMarksIfReached(qint64 current) { - const qint64 current = currentTime(); const qint64 total = totalTime(); const qint64 remaining = total - current; diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h index abd6bff6e4..308b5af91f 100644 --- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h +++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h @@ -91,7 +91,7 @@ private: void stopBufferStatusTimer(); void stopTimers(); void doVolumeChanged(); - void emitMarksIfReached(); + void emitMarksIfReached(qint64 position); void resetMarksIfRewound(); private Q_SLOTS: -- cgit v1.2.3