src/3rdparty/phonon/mmf/mediaobject.cpp
changeset 22 79de32ba3296
parent 19 fcece45ef507
child 33 3e2da88830cd
equal deleted inserted replaced
19:fcece45ef507 22:79de32ba3296
   321     }
   321     }
   322 
   322 
   323     connect(m_player.data(), SIGNAL(totalTimeChanged(qint64)), SIGNAL(totalTimeChanged(qint64)));
   323     connect(m_player.data(), SIGNAL(totalTimeChanged(qint64)), SIGNAL(totalTimeChanged(qint64)));
   324     connect(m_player.data(), SIGNAL(stateChanged(Phonon::State,Phonon::State)), SIGNAL(stateChanged(Phonon::State,Phonon::State)));
   324     connect(m_player.data(), SIGNAL(stateChanged(Phonon::State,Phonon::State)), SIGNAL(stateChanged(Phonon::State,Phonon::State)));
   325     connect(m_player.data(), SIGNAL(finished()), SIGNAL(finished()));
   325     connect(m_player.data(), SIGNAL(finished()), SIGNAL(finished()));
   326     connect(m_player.data(), SIGNAL(tick(qint64)), SIGNAL(tick(qint64)));
       
   327     connect(m_player.data(), SIGNAL(bufferStatus(int)), SIGNAL(bufferStatus(int)));
   326     connect(m_player.data(), SIGNAL(bufferStatus(int)), SIGNAL(bufferStatus(int)));
   328     connect(m_player.data(), SIGNAL(metaDataChanged(QMultiMap<QString,QString>)), SIGNAL(metaDataChanged(QMultiMap<QString,QString>)));
   327     connect(m_player.data(), SIGNAL(metaDataChanged(QMultiMap<QString,QString>)), SIGNAL(metaDataChanged(QMultiMap<QString,QString>)));
   329     connect(m_player.data(), SIGNAL(aboutToFinish()), SIGNAL(aboutToFinish()));
   328     connect(m_player.data(), SIGNAL(aboutToFinish()), SIGNAL(aboutToFinish()));
   330     connect(m_player.data(), SIGNAL(prefinishMarkReached(qint32)), SIGNAL(tick(qint32)));
   329     connect(m_player.data(), SIGNAL(prefinishMarkReached(qint32)), SIGNAL(prefinishMarkReached(qint32)));
       
   330     connect(m_player.data(), SIGNAL(prefinishMarkReached(qint32)), SLOT(handlePrefinishMarkReached(qint32)));
       
   331     connect(m_player.data(), SIGNAL(tick(qint64)), SIGNAL(tick(qint64)));
   331 
   332 
   332     // We need to call setError() after doing the connects, otherwise the
   333     // We need to call setError() after doing the connects, otherwise the
   333     // error won't be received.
   334     // error won't be received.
   334     if (!errorMessage.isEmpty()) {
   335     if (!errorMessage.isEmpty()) {
   335         Q_ASSERT(m_player);
   336         Q_ASSERT(m_player);
   412 {
   413 {
   413     if (m_nextSourceSet) {
   414     if (m_nextSourceSet) {
   414         m_nextSourceSet = false;
   415         m_nextSourceSet = false;
   415         switchToSource(m_nextSource);
   416         switchToSource(m_nextSource);
   416         play();
   417         play();
   417     }
   418     } else {
   418 }
   419         emit finished();
       
   420     }
       
   421 }
       
   422 
       
   423 //-----------------------------------------------------------------------------
       
   424 // Other private functions
       
   425 //-----------------------------------------------------------------------------
       
   426 
       
   427 void MMF::MediaObject::handlePrefinishMarkReached(qint32 time)
       
   428 {
       
   429     emit tick(time);
       
   430 }
       
   431 
   419 
   432 
   420 QT_END_NAMESPACE
   433 QT_END_NAMESPACE
   421 
   434