Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Weird QMediaPlayer::setPosition behavior
QtWS25 Last Chance

Weird QMediaPlayer::setPosition behavior

Scheduled Pinned Locked Moved Solved General and Desktop
qmediaplayerwindows 7qt 5.2.1
6 Posts 2 Posters 4.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    enmaniac
    wrote on 8 Jan 2016, 22:09 last edited by
    #1

    Hi all,

    I was trying out one of the examples delivered with Qt 5.2.1 sources - example/multimediawidgets/player.
    I have encountered some weird behavior which looks like a bug.

    When the playback is started, QMediaPlayer::positionChanged(qint64) is delivered regularly (every sec or so).
    Now, when you PAUSE the playback and drag the slider QMediaPlayer::setPosition(qint64) is called with new offset.

    And now two funny things:

    • player automatically resumes playback, however NO positionChanged signal is emitted anymore
    • despite the resumed playback, if state of the player is checked via QMediaPlayer::state(), QMediaPlayer::PausedState is reported

    I have observed this on my Windows 7 64bit machine. Qt sources built with MSVC 2010 in 32-bit mode.

    Is it a bug or intended behavior ?
    Cheers

    Cheers!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 8 Jan 2016, 22:38 last edited by
      #2

      Hi,

      I don't think that it's the intended behavior. Can you check again with 5.6 Beta if it's still happening ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 1 Reply Last reply 9 Jan 2016, 00:16
      0
      • S SGaist
        8 Jan 2016, 22:38

        Hi,

        I don't think that it's the intended behavior. Can you check again with 5.6 Beta if it's still happening ?

        E Offline
        E Offline
        enmaniac
        wrote on 9 Jan 2016, 00:16 last edited by enmaniac 1 Sept 2016, 14:16
        #3

        @SGaist Sure, I am building sources now. However, I have already encountered some build problems with generated makefiles. I'll try to tweak them to continue with the rest of the process. If I succeed I'll make a new test and let you know.

        EDIT: I wasnt able to build the Qt 5.6 beta sources in the end. It seems the QMake generates some buggy makefiles.
        Basically, compilation fails in many place due to the same issue:

         (set QT_PLUGIN_PATH=D:\Work\Test\qt-everywhere-opensource-src-5.6.0-beta\qtbase\plugins) & (set PATH=D:\Work\Test\qt-everywhere-opensource-src-5.6.0-beta\qtbase\bin;%PATH:)=^)%) & D:\Work\Test\qt-everywhere-opensource-src-5.6.0-beta\qtbase\bin\uic.exe controller.ui -o .uic\ui_controller.h
        NMAKE : fatal error U1077: '(set' : return code '0xc0000135' Stop.
        NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
        

        I have compared the generated makefiles with my 5.2.1 build and it seems the problem lies in PATH setting:

        In 5.2.1 generated makefilesI can see the following:

        set PATH=D:\Work\Test\qt-everywhere-opensource-src-5.6.0-beta\qtbase\lib;%%PATH:)=^)%%

        while in 5.6-beta there is a small change:

        set PATH=D:\Work\Test\qt-everywhere-opensource-src-5.6.0-beta\qtbase\bin;%%PATH:)=^)%%

        Fixing it to what can be seen in 5.2.1 allows the target to build successfully. However, more and more targets suffer from the same issue later on.

        Is it something with my setup ?

        Cheers!

        1 Reply Last reply
        0
        • E Offline
          E Offline
          enmaniac
          wrote on 10 Jan 2016, 21:29 last edited by
          #4

          Ok. I finally managed to build the 5.6 beta sources. It seems 5.6-beta DOES NOT suffer from the same problem.

          Cheers!

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 10 Jan 2016, 21:56 last edited by
            #5

            Good news ! :)

            In that case, please mark the thread as solved using the "Topic Tool" button so other forum users may know that a solution has been found :)

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            E 1 Reply Last reply 10 Jan 2016, 22:59
            0
            • S SGaist
              10 Jan 2016, 21:56

              Good news ! :)

              In that case, please mark the thread as solved using the "Topic Tool" button so other forum users may know that a solution has been found :)

              E Offline
              E Offline
              enmaniac
              wrote on 10 Jan 2016, 22:59 last edited by
              #6

              @SGaist Will do. Thank you!

              Cheers!

              1 Reply Last reply
              0

              1/6

              8 Jan 2016, 22:09

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved