Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Solved Weird QMediaPlayer::setPosition behavior

    General and Desktop
    qmediaplayer windows 7 qt 5.2.1
    2
    6
    3035
    Loading More Posts
    • 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
      enmaniac last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • E
          enmaniac @SGaist last edited by enmaniac

          @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 Reply Quote 0
          • E
            enmaniac last edited by

            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 Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              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 Reply Quote 0
              • E
                enmaniac @SGaist last edited by

                @SGaist Will do. Thank you!

                Cheers!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post