Changeset 846 for trunk/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
r769 r846 17 17 */ 18 18 19 #include <QDir> 19 20 #include <QUrl> 20 21 #include <QTimer> … … 67 68 createPlayer(); 68 69 70 m_player->RegisterForVideoLoadingNotification(*this); 71 69 72 TRACE_EXIT_0(); 70 73 } … … 131 134 } 132 135 136 int MMF::AbstractVideoPlayer::openFile(const QString &fileName) 137 { 138 const QHBufC nativeFileName(QDir::toNativeSeparators(fileName)); 139 TRAPD(err, m_player->OpenFileL(*nativeFileName)); 140 return err; 141 } 142 133 143 int MMF::AbstractVideoPlayer::openFile(RFile &file) 134 144 { … … 137 147 } 138 148 139 int MMF::AbstractVideoPlayer::openUrl(const QString &url) 140 { 141 TRAPD(err, m_player->OpenUrlL(qt_QString2TPtrC(url))); 149 int MMF::AbstractVideoPlayer::openUrl(const QString &url, int iap) 150 { 151 TRAPD(err, m_player->OpenUrlL(qt_QString2TPtrC(url), iap)); 152 return err; 153 } 154 155 int MMF::AbstractVideoPlayer::openDescriptor(const TDesC8 &des) 156 { 157 TRAPD(err, m_player->OpenDesL(des)); 142 158 return err; 143 159 } … … 150 166 } 151 167 152 void MMF::AbstractVideoPlayer:: close()168 void MMF::AbstractVideoPlayer::doClose() 153 169 { 154 170 m_player->Close(); … … 160 176 } 161 177 162 qint64 MMF::AbstractVideoPlayer:: currentTime() const163 { 164 TRACE_CONTEXT(AbstractVideoPlayer:: currentTime, EVideoApi);178 qint64 MMF::AbstractVideoPlayer::getCurrentTime() const 179 { 180 TRACE_CONTEXT(AbstractVideoPlayer::getCurrentTime, EVideoApi); 165 181 166 182 TTimeIntervalMicroSeconds us; … … 212 228 TRACE_ENTRY("state %d aspectRatio %d", state()); 213 229 214 updateScaleFactors(m_videoOutput->videoWindowSize()); 230 if (m_videoOutput) 231 updateScaleFactors(m_videoOutput->videoWindowSize()); 215 232 216 233 TRACE_EXIT_0(); … … 222 239 TRACE_ENTRY("state %d", state()); 223 240 224 updateScaleFactors(m_videoOutput->videoWindowSize()); 241 if (m_videoOutput) 242 updateScaleFactors(m_videoOutput->videoWindowSize()); 225 243 226 244 TRACE_EXIT_0(); … … 237 255 TRACE_ENTRY("state %d error %d", state(), aError); 238 256 239 __ASSERT_ALWAYS(LoadingState == state(), Utils::panic(InvalidStatePanic)); 257 __ASSERT_ALWAYS(LoadingState == state() || 258 progressiveDownloadStalled() && BufferingState == state(), 259 Utils::panic(InvalidStatePanic)); 240 260 241 261 if (KErrNone == aError) … … 252 272 TRACE_ENTRY("state %d error %d", state(), aError); 253 273 254 __ASSERT_ALWAYS(LoadingState == state(), Utils::panic(InvalidStatePanic)); 274 __ASSERT_ALWAYS(LoadingState == state() || 275 progressiveDownloadStalled() && BufferingState == state(), 276 Utils::panic(InvalidStatePanic)); 255 277 256 278 TRAPD(err, getVideoClipParametersL(aError)); … … 358 380 void MMF::AbstractVideoPlayer::initVideoOutput() 359 381 { 382 Q_ASSERT(m_videoOutput); 383 360 384 bool connected = connect( 361 385 m_videoOutput, SIGNAL(videoWindowChanged()), … … 379 403 Q_UNUSED(connected); 380 404 381 // Do these after all connections are complete, to ensure382 // that any signals generated get to their destinations.383 m_videoOutput->winId();384 405 m_videoOutput->setVideoSize(m_videoFrameSize); 385 406 } … … 401 422 void MMF::AbstractVideoPlayer::updateScaleFactors(const QSize &windowSize, bool apply) 402 423 { 424 Q_ASSERT(m_videoOutput); 425 403 426 if (m_videoFrameSize.isValid()) { 404 427 QRect videoRect; … … 460 483 void MMF::AbstractVideoPlayer::parametersChanged(VideoParameters parameters) 461 484 { 462 if (state() == LoadingState )485 if (state() == LoadingState || progressiveDownloadStalled() && BufferingState == state()) 463 486 m_pendingChanges |= parameters; 464 487 else
Note:
See TracChangeset
for help on using the changeset viewer.