Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.9.1, 5.10.0 Alpha
-
None
Description
Based on http://doc.qt.io/qt-5/qmediaplayer.html
QMediaPlayer::LoadedMedia - The current media has been loaded. The player is in the StoppedState. QMediaPlayer::BufferedMedia- The player has fully buffered the current media. The player is in the PlayingState or PausedState.
If play->stop, mediaStatus would be LoadedMedia
If play->pause->Stop it will be BufferedMedia
Due to no event stateChanged emitted.
#include <QMediaPlayer> #include <QDebug> #include <QCoreApplication> #include <QFileInfo> #include <QTest> int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); QMediaPlayer player; QMediaContent localWavFile; const QString testFileName = "test.wav"; QFileInfo wavFile(testFileName); localWavFile = QMediaContent(QUrl::fromLocalFile(wavFile.absoluteFilePath())); player.setMedia(localWavFile); player.play(); QTest::qWait(1000); qDebug() << player.mediaStatus(); player.pause(); QTest::qWait(1000); qDebug() << player.mediaStatus(); player.stop(); QTest::qWait(1000); qDebug()<<player.mediaStatus(); return app.exec(); }
Attachments
Issue Links
- relates to
-
QTBUG-46368 tst_qmediaplayerbackend fails on all platforms
- Closed
-
QTBUG-59604 Fix tst_QMediaPlayerBackend
- Closed
For Gerrit Dashboard: QTBUG-63517 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
207317,3 | Fix Gstreamer plugin to pass tst_QMediaPlayerBackend | 5.11 | qt/qtmultimedia | Status: MERGED | +2 | 0 |