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. QMediaPlayer stays in UnknownMediaStatus on Windows 7
QtWS25 Last Chance

QMediaPlayer stays in UnknownMediaStatus on Windows 7

Scheduled Pinned Locked Moved Unsolved General and Desktop
qmediaplayerwindows 7windows7video
4 Posts 2 Posters 1.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.
  • Q Offline
    Q Offline
    QuentinJanuel
    wrote on 18 Jul 2018, 12:04 last edited by QuentinJanuel
    #1

    I created a very simple video player in Qt (C++) on my win10 and it all worked fine, until I exported it to another computer win7, so I tried on win8 and it still worked but not win7.

    Sadly, since I need to release my application to win7, this is very hard for me to debug. I then simplified the code to that:

    QMediaPlayer * mp = new QMediaPlayer();
    mp->mediaStatus(); // returns 1 (=NoMedia) on win8/win10 but 0 (=UnknownMediaStatus) on win7
    

    I use QtCreator 4.6.1 and I know it's old but I cannot upgrade yet.

    Thanks in advance.

    J 1 Reply Last reply 18 Jul 2018, 12:23
    0
    • Q QuentinJanuel
      18 Jul 2018, 12:04

      I created a very simple video player in Qt (C++) on my win10 and it all worked fine, until I exported it to another computer win7, so I tried on win8 and it still worked but not win7.

      Sadly, since I need to release my application to win7, this is very hard for me to debug. I then simplified the code to that:

      QMediaPlayer * mp = new QMediaPlayer();
      mp->mediaStatus(); // returns 1 (=NoMedia) on win8/win10 but 0 (=UnknownMediaStatus) on win7
      

      I use QtCreator 4.6.1 and I know it's old but I cannot upgrade yet.

      Thanks in advance.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 18 Jul 2018, 12:23 last edited by
      #2

      @QuentinJanuel said in QMediaPlayer stays in UnknownMediaStatus on Windows 7:

      I use QtCreator 4.6.1 and I know it's old but I cannot upgrade yet.

      This is actually quite up to date QtCreator version.
      I guess you mean Qt version, but Qt != QtCreator.
      But don't use "Help/About Qt Creator..." to find out which Qt version you're using. Check your Kit for that.

      How did you deploy your app?
      Take a look at https://doc.qt.io/Qt-5/windows-deployment.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • Q Offline
        Q Offline
        QuentinJanuel
        wrote on 18 Jul 2018, 12:42 last edited by QuentinJanuel
        #3

        It says I use the Qt version 5.4.2, and MSVC2010 as my compiler.
        This is not a personal project and therefore I can't change any of those configurations.

        Also yes I did deploy it, that's how I exported it to windows 7.
        Once again, if I open the output executable on win8 it all works fine (I mean I just log the QMediaPlayer's status and it is "NoMedia" (aka 1)). But if I run the exact same exe on windows 7 it logs "UnknownMediaStatus".

        I'm almost sure that's were the issue is since before I had made the entire video player and it worked in win8/10 but not 7. So I tried to isolate where it started to go wrong and there we are.

        Perhaps there is a way to see the log messages (if eventually a warning or an error occures), but since I deploy it as an exe I can't see anything (I used a label to manually print the MediaPlayer's status).

        Also this windows 7 is very slow VM, there is no way I can install QtCreator on it to check it out, unfortunately.

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          QuentinJanuel
          wrote on 18 Jul 2018, 12:53 last edited by
          #4

          Here is pretty much the commands I use to deploy the app:

          qmake videoplayer/videoplayer.pro -o build/MakeFile -r -spec win32-msvc2010 -nocache
          
          jom -f Makefile -s
          
          windeployqt --release release
          
          1 Reply Last reply
          0

          4/4

          18 Jul 2018, 12:53

          • Login

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