Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/3rdparty/phonon/mmf/mediaobject.cpp

    r651 r769  
    2323#include "utils.h"
    2424#include "utils.h"
    25 #include "mmf_videoplayer.h"
     25
     26#ifdef PHONON_MMF_VIDEO_SURFACES
     27#include "videoplayer_surface.h"
     28#else
     29#include "videoplayer_dsa.h"
     30#endif
     31
    2632#include "videowidget.h"
    2733
     
    294300
    295301    case MediaTypeVideo:
    296         newPlayer = new VideoPlayer(this, oldPlayer);
     302#ifdef PHONON_MMF_VIDEO_SURFACES
     303        newPlayer = SurfaceVideoPlayer::create(this, oldPlayer);
     304#else
     305        newPlayer = DsaVideoPlayer::create(this, oldPlayer);
     306#endif
    297307        break;
    298308    }
     
    314324    connect(m_player.data(), SIGNAL(stateChanged(Phonon::State,Phonon::State)), SIGNAL(stateChanged(Phonon::State,Phonon::State)));
    315325    connect(m_player.data(), SIGNAL(finished()), SIGNAL(finished()));
    316     connect(m_player.data(), SIGNAL(tick(qint64)), SIGNAL(tick(qint64)));
    317326    connect(m_player.data(), SIGNAL(bufferStatus(int)), SIGNAL(bufferStatus(int)));
    318327    connect(m_player.data(), SIGNAL(metaDataChanged(QMultiMap<QString,QString>)), SIGNAL(metaDataChanged(QMultiMap<QString,QString>)));
    319328    connect(m_player.data(), SIGNAL(aboutToFinish()), SIGNAL(aboutToFinish()));
    320     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)));
    321332
    322333    // We need to call setError() after doing the connects, otherwise the
     
    384395//-----------------------------------------------------------------------------
    385396
    386 void MMF::MediaObject::setVideoOutput(VideoOutput* videoOutput)
     397void MMF::MediaObject::setVideoOutput(AbstractVideoOutput* videoOutput)
    387398{
    388399    m_player->setVideoOutput(videoOutput);
     
    405416        switchToSource(m_nextSource);
    406417        play();
    407     }
    408 }
     418    } else {
     419        emit finished();
     420    }
     421}
     422
     423//-----------------------------------------------------------------------------
     424// Other private functions
     425//-----------------------------------------------------------------------------
     426
     427void MMF::MediaObject::handlePrefinishMarkReached(qint32 time)
     428{
     429    emit tick(time);
     430}
     431
    409432
    410433QT_END_NAMESPACE
Note: See TracChangeset for help on using the changeset viewer.