diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-05 01:44:20 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-05 01:44:20 (GMT) |
commit | c2dd4131e4eddd7669b2947e0bdd4ebae9cb26db (patch) | |
tree | ebd82aec99f15c14e689f15711c0a1e7267929d8 /src/3rdparty/phonon/mmf/abstractvideoplayer.cpp | |
parent | a7bf1cfb1a75c35e837c01f4a5b0697fc8961148 (diff) | |
parent | 2ab99337faa0ec03721fb39cae52361f7ac4d780 (diff) | |
download | Qt-c2dd4131e4eddd7669b2947e0bdd4ebae9cb26db.zip Qt-c2dd4131e4eddd7669b2947e0bdd4ebae9cb26db.tar.gz Qt-c2dd4131e4eddd7669b2947e0bdd4ebae9cb26db.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Fix gcc compilation problems in QtOpenGL. Actually was typo and
Revert "When using complex transformations rendering goes easily off by one pixel."
fix for USER: 163 panic found on 5800XM
Fixed library ordering when linking to qtmain.
Made javascriptcore depend on corelib.
Enable QtOpenGL vector path caching on Symbian/IVE3
Made scripttools disabled on Symbian by default, like on Windows.
Got rid of "No such directory" warning when shadow building.
Added qmake check for presence of RHttpDownloadMgr header
Fixed crash on startup in Symbian debug build
fixed hybrid heap Symbian udeb build issues
qmediaplayer: show buffer status of 0%
Progressive download in Phonon MMF backend: integrated with player
Progressive download in Phonon MMF backend: added download managers
Remove partial upgrade deployment generation for Webkit
Diffstat (limited to 'src/3rdparty/phonon/mmf/abstractvideoplayer.cpp')
-rw-r--r-- | src/3rdparty/phonon/mmf/abstractvideoplayer.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp index fb20bea..1ab5bae 100644 --- a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp +++ b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp @@ -16,6 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. */ +#include <QDir> #include <QUrl> #include <QTimer> #include <QWidget> @@ -132,6 +133,13 @@ int MMF::AbstractVideoPlayer::setDeviceVolume(int mmfVolume) return err; } +int MMF::AbstractVideoPlayer::openFile(const QString &fileName) +{ + const QHBufC nativeFileName(QDir::toNativeSeparators(fileName)); + TRAPD(err, m_player->OpenFileL(*nativeFileName)); + return err; +} + int MMF::AbstractVideoPlayer::openFile(RFile &file) { TRAPD(err, m_player->OpenFileL(file)); @@ -157,7 +165,7 @@ int MMF::AbstractVideoPlayer::bufferStatus() const return result; } -void MMF::AbstractVideoPlayer::close() +void MMF::AbstractVideoPlayer::doClose() { m_player->Close(); } @@ -167,9 +175,9 @@ bool MMF::AbstractVideoPlayer::hasVideo() const return true; } -qint64 MMF::AbstractVideoPlayer::currentTime() const +qint64 MMF::AbstractVideoPlayer::getCurrentTime() const { - TRACE_CONTEXT(AbstractVideoPlayer::currentTime, EVideoApi); + TRACE_CONTEXT(AbstractVideoPlayer::getCurrentTime, EVideoApi); TTimeIntervalMicroSeconds us; TRAPD(err, us = m_player->PositionL()) @@ -246,7 +254,9 @@ void MMF::AbstractVideoPlayer::MvpuoOpenComplete(TInt aError) TRACE_CONTEXT(AbstractVideoPlayer::MvpuoOpenComplete, EVideoApi); TRACE_ENTRY("state %d error %d", state(), aError); - __ASSERT_ALWAYS(LoadingState == state(), Utils::panic(InvalidStatePanic)); + __ASSERT_ALWAYS(LoadingState == state() || + progressiveDownloadStalled() && BufferingState == state(), + Utils::panic(InvalidStatePanic)); if (KErrNone == aError) m_player->Prepare(); @@ -261,7 +271,9 @@ void MMF::AbstractVideoPlayer::MvpuoPrepareComplete(TInt aError) TRACE_CONTEXT(AbstractVideoPlayer::MvpuoPrepareComplete, EVideoApi); TRACE_ENTRY("state %d error %d", state(), aError); - __ASSERT_ALWAYS(LoadingState == state(), Utils::panic(InvalidStatePanic)); + __ASSERT_ALWAYS(LoadingState == state() || + progressiveDownloadStalled() && BufferingState == state(), + Utils::panic(InvalidStatePanic)); TRAPD(err, getVideoClipParametersL(aError)); @@ -470,7 +482,7 @@ void MMF::AbstractVideoPlayer::updateScaleFactors(const QSize &windowSize, bool void MMF::AbstractVideoPlayer::parametersChanged(VideoParameters parameters) { - if (state() == LoadingState) + if (state() == LoadingState || progressiveDownloadStalled() && BufferingState == state()) m_pendingChanges |= parameters; else handleParametersChanged(parameters); |