src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
changeset 33 3e2da88830cd
parent 22 79de32ba3296
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    59 // Public functions
    59 // Public functions
    60 //-----------------------------------------------------------------------------
    60 //-----------------------------------------------------------------------------
    61 
    61 
    62 void MMF::DsaVideoPlayer::videoWindowScreenRectChanged()
    62 void MMF::DsaVideoPlayer::videoWindowScreenRectChanged()
    63 {
    63 {
       
    64     Q_ASSERT(m_videoOutput);
       
    65 
    64     QRect windowRect = static_cast<DsaVideoOutput *>(m_videoOutput)->videoWindowScreenRect();
    66     QRect windowRect = static_cast<DsaVideoOutput *>(m_videoOutput)->videoWindowScreenRect();
    65 
    67 
    66     // Clip to physical window size
    68     // Clip to physical window size
    67     // This is due to a defect in the layout when running on S60 3.2, which
    69     // This is due to a defect in the layout when running on S60 3.2, which
    68     // results in the rectangle of the video widget extending outside the
    70     // results in the rectangle of the video widget extending outside the
   122                                      m_videoScreenRect, m_videoScreenRect));
   124                                      m_videoScreenRect, m_videoScreenRect));
   123     m_player.reset(player);
   125     m_player.reset(player);
   124 
   126 
   125     // CVideoPlayerUtility::NewL starts DSA
   127     // CVideoPlayerUtility::NewL starts DSA
   126     m_dsaActive = true;
   128     m_dsaActive = true;
   127 
       
   128     m_player->RegisterForVideoLoadingNotification(*this);
       
   129 }
   129 }
   130 
   130 
   131 void MMF::DsaVideoPlayer::initVideoOutput()
   131 void MMF::DsaVideoPlayer::initVideoOutput()
   132 {
   132 {
       
   133     Q_ASSERT(m_videoOutput);
       
   134 
   133     bool connected = connect(
   135     bool connected = connect(
   134         m_videoOutput, SIGNAL(videoWindowScreenRectChanged()),
   136         m_videoOutput, SIGNAL(videoWindowScreenRectChanged()),
   135         this, SLOT(videoWindowScreenRectChanged())
   137         this, SLOT(videoWindowScreenRectChanged())
   136     );
   138     );
   137     Q_ASSERT(connected);
   139     Q_ASSERT(connected);
   154     AbstractVideoPlayer::initVideoOutput();
   156     AbstractVideoPlayer::initVideoOutput();
   155 }
   157 }
   156 
   158 
   157 void MMF::DsaVideoPlayer::prepareCompleted()
   159 void MMF::DsaVideoPlayer::prepareCompleted()
   158 {
   160 {
   159     videoWindowScreenRectChanged();
   161     if (m_videoOutput)
       
   162         videoWindowScreenRectChanged();
   160 }
   163 }
   161 
   164 
   162 void MMF::DsaVideoPlayer::handleVideoWindowChanged()
   165 void MMF::DsaVideoPlayer::handleVideoWindowChanged()
   163 {
   166 {
   164     if (!m_window) {
   167     if (!m_window) {