Priority: P2: Important
Affects Version/s: 6.2.0 Beta1
Fix Version/s: None
Follow-up on the mediaStatus related issues from: https://bugreports.qt.io/browse/QTBUG-95317
Note: Observations were made using Gstreamer backend.
- Upon the creation of the MediaPlayer item (as sampled within Component.onComplete), and before the loading/selection of any source media, the value of mediaStatus starts with a default value of 5, which corresponds to BufferedMedia in Q_ENUM(MediaStatus).
- After setting the source URL to a valid video file, the status changes in the following sequence:
- BufferedMedia (5)
- NoMedia (0)
- LoadingMedia (1)
- LoadedMedia (2)
- Upon clicking play, the media status changes to BufferedMedia (5)
- Upon stopping the video, the status returns to LoadedMedia (2)
- Upon setting the source url to "", the status returns to NoMedia (0).
- MediaPlayer status should start with a NoMedia (0) value.
- The status should never reflect any state other than NoMedia if the source url is empty
- The BufferedMedia status should probably be preceeded by the BufferingMedia status? This may not be an issue in that it may happen all in one tick in certain situations so BufferingMedia essentially appears to be skipped.
Methods to reproduce in qtmultimedia/examples/multimedia/video/mediaplayer:
- Add the following debug statements to the MediaPlayer in main.qml:
- In PlayerMenuBar.qml, comment out the stop() and play() calls in FileDialog.onAccepted() to prevent automatic state changes and allow us to see things at a more fine-grain level:
- In PlaybackControl.qml, add a "source reset button" beside the AudioControl item:
Then to produce the results:
- Launch the program. The following should be printed:
2. Load a video.
3. Click play.
4. Click pause.
5. Click the "source reset" button to set the mediaPlayer.source=""