I am currently trying to develop an application to play a video but I'm having some issues with QMediaPlayer and its behaviour.
What my application should do is as following:
- Load media/playlist
- Start video
- Play it for 10s
- Stop it
- Clear the playlist
- Wait for 5s
- Start again indefinitely
I developed all this using a QMediaPlayer, with QMediaPlaylist, on a QGraphicsVideoItem, and with timers to handle playing/pause duration. I listen to different kind of signals such as positionChanged, stateChanged, mediaStatusChanged...
The first time I play the video, it loads fine and plays fine. But I noticed when it stops and tries to clear the playlist, I don't receive all the events I expect to receive:
- After calling stop, mediaStatusChanged says media is loaded: expected behaviour as the player is stopped.
- After clearing the playlist, I don't receive any event from mediaStatusChanged and mediaStatus stays as loaded whereas the playlist is empty. In this case, I was expecting a NoMedia event in mediaStatusChanged, is that right?
Then, if I keep going, the player will start playing but it will not play anything...
Also, it might or might not be related, but I noticed that if I do not call setVideoOutput, then I don't see the issue above but I can see the position being updated and the different mediaStatus events. I also don't have any video on screen but this was expected for the test

Did you already hear about this kind of issue? Do you have any idea on how to fix this?
I hope it's clear enough, let me know if it needs more details.
Best regards,
Paul