Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-33761

On MacOS, QMediaPlayer does not exit QMediaPlayer::PlayingState (or receive QMediaPlayer::EndOfMedia) at end of videos (but it does on Linux)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.1.0 , 5.1.1, 5.4.1, 5.5.0
    • Multimedia
    • None
    • macOS

    Description

      There's a fair amount of commentary at http://qt-project.org/forums/viewthread/33099/ but my 3rd post there http://qt-project.org/forums/viewthread/33099/#144800 is probably the simplest illustration.

      Basically the example in Qt's supplied examples/multimediawidgets/videowidget behaves differently between Linux and Mac with regard to whether/when end of a video stream is reported back to the app via changes to QMediaPlayer::State (and QMediaPlayer::MediaStatus). The Linux behaviour seems correct and sensible and is presumably intended (a video ends and it immediately tells you it has). The Mac is more random; sometimes it works as expected but more often the video position just sticks at a constant value and the expected state changes don't arrive until later (minimising the app or obscuring it with another window seem to be reliable ways of flushing them).

      The obvious symptom in the example is that the play/pause icon displayed on the button (usually) doesn't change on the Mac when the video ends, but it always does on Linux. Adding some console logging to the example (and a slot for MediaStatus changes) makes it a bit more obvious what's happening.

      Worst case these state changes can arrive when the user has started interacting with the video in other ways (scrubbing video position manually, for example) and the delayed arrival of a stop and reset of the video position to the start is most confusing.

      Attachments

        1. videoplayer.cpp
          5 kB
        2. videoplayer.h
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            timday Tim Day
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes