Ensure Phonon MMF backend emits aboutToFinish
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>
Wed, 31 Mar 2010 12:49:35 +0000 (13:49 +0100)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>
Wed, 31 Mar 2010 13:33:19 +0000 (14:33 +0100)
commit6ac2419622eadb54c86e24c6a57824c7f78b07ac
treea59f465a6271e113bb23398f48b3c952695c7213
parent91ba0239bcaca91e5d07b685e53ecd3ce13d58ba
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
src/3rdparty/phonon/mmf/abstractmediaplayer.h