summaryrefslogtreecommitdiffstats
path: root/src/plugins/wmf/player/mfplayersession.cpp
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2013-12-04 15:11:33 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-04 18:46:07 +0100
commitcbe9fc8e4db4efcf6a6b5e104af38bdf08f21984 (patch)
tree64eed5eb860b3897c9cbd3d4c46760e792eceffe /src/plugins/wmf/player/mfplayersession.cpp
parentfb0620219bfcdcd608ae0a60f3bba370238cd826 (diff)
Revert "WMF: fixed MediaPlayer buffering logic."
This reverts commit d599f7319af86265083bae96f21d942aeff24737. This was not the correct logic... According to the documentation, the BufferedMedia status should be set only when in the PlayingState. Change-Id: I36053ebc09c0517fcd2a1a7f2b091fbe8f04f3d0 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'src/plugins/wmf/player/mfplayersession.cpp')
-rw-r--r--src/plugins/wmf/player/mfplayersession.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp
index adc762d6e..3c12bb046 100644
--- a/src/plugins/wmf/player/mfplayersession.cpp
+++ b/src/plugins/wmf/player/mfplayersession.cpp
@@ -1326,6 +1326,8 @@ void MFPlayerSession::start()
switch (m_status) {
case QMediaPlayer::EndOfMedia:
m_varStart.hVal.QuadPart = 0;
+ //since it must be loaded already, just fallthrough
+ case QMediaPlayer::LoadedMedia:
changeStatus(QMediaPlayer::BufferedMedia);
return;
}
@@ -1920,12 +1922,10 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent)
switch (meType) {
case MEBufferingStarted:
- changeStatus(m_status == QMediaPlayer::LoadedMedia ? QMediaPlayer::BufferingMedia : QMediaPlayer::StalledMedia);
+ changeStatus(QMediaPlayer::StalledMedia);
emit bufferStatusChanged(bufferStatus());
break;
case MEBufferingStopped:
- if (m_status == QMediaPlayer::BufferingMedia)
- stop(true);
changeStatus(QMediaPlayer::BufferedMedia);
emit bufferStatusChanged(bufferStatus());
break;
@@ -1990,16 +1990,6 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent)
}
}
MFGetService(m_session, MFNETSOURCE_STATISTICS_SERVICE, IID_PPV_ARGS(&m_netsourceStatistics));
-
- if (!m_netsourceStatistics || bufferStatus() == 100) {
- // If the source reader doesn't implement the statistics service, just set the status
- // to buffered, since there is no way to query the buffering progress...
- changeStatus(QMediaPlayer::BufferedMedia);
- } else {
- // Start to trigger buffering. Once enough buffering is done, the session will
- // be automatically stopped unless the user has explicitly started playback.
- start();
- }
}
}
}