mer-packages/qtmultimedia — pull request #20 by tihonko (2013-11-26 08:55:20+00:00)
Title: Auto resume play when resources are available. Resource acquire optimization.

FIX 1: Removed resource release in handleResourcesLost for auto resume to work.

ResourceSet has AutoRelease false by default. Thus resources are automatically re-gained when they are available. To auto resume play after the preempting application has released its resources resources should not be released when they are lost.

FIX 2: Prevent resource acquire if acquire request is ongoing

ResourcePolicyImpl::acquire() is called twice when starting to play media file.
1st in QGstreamerPlayerControl::setMedia(const QMediaContent &content, QIODevice *stream)
if (!content.isNull() || stream) {
if (!m_resources->isGranted())
m_resources->acquire();
2nd in QGstreamerPlayerControl::playOrPause(QMediaPlayer::State newState) as resources for the 1st acquire has not yet been granted when coming to this code
if (!m_resources->isGranted())
m_resources->acquire();