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. Playing https source in QMediaPlayer on Windows
Qt 6.11 is out! See what's new in the release blog

Playing https source in QMediaPlayer on Windows

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 2.3k Views 2 Watching
  • 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.
  • P Offline
    P Offline
    pbouda
    wrote on last edited by
    #1

    Hi,
    I am trying to use the QMediaPlayer to play an mp3 from a https source. Everything works fine on Linux and Mac, but on Windows it just doesn't work (while http works). The certificate is signed and I can access the https server via normal requests from a QNetworkAccessManager without problems. I traced the problem down to the SourceResolver in the wmf plugin. The call to m_sourceResolver->EndCreateObjectFromURL() in resourceresolver.cpp -> Invoke() returns OK (0) with http files, but some error code (-2147012721) with https. I have no idea how to go on from here. Does anybody has an idea how to debug from here on? Anybody with the same problem?

    Peter

    http://www.peterbouda.eu

    P 1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi @pbouda,

      To use the HTTPS protocol, you need to install OpenSSL.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      P 1 Reply Last reply
      0
      • JKSHJ JKSH

        Hi @pbouda,

        To use the HTTPS protocol, you need to install OpenSSL.

        P Offline
        P Offline
        pbouda
        wrote on last edited by
        #3

        @JKSH Yes, that's what I did, and SSL access works fine in Qt via the NetworkAccessManager, if I just send GETs and POSTs. But not if I try to load a mp3 in the WMF plugin, for some reason...

        Peter

        http://www.peterbouda.eu

        1 Reply Last reply
        0
        • P pbouda

          Hi,
          I am trying to use the QMediaPlayer to play an mp3 from a https source. Everything works fine on Linux and Mac, but on Windows it just doesn't work (while http works). The certificate is signed and I can access the https server via normal requests from a QNetworkAccessManager without problems. I traced the problem down to the SourceResolver in the wmf plugin. The call to m_sourceResolver->EndCreateObjectFromURL() in resourceresolver.cpp -> Invoke() returns OK (0) with http files, but some error code (-2147012721) with https. I have no idea how to go on from here. Does anybody has an idea how to debug from here on? Anybody with the same problem?

          P Offline
          P Offline
          pbouda
          wrote on last edited by
          #4

          OK, I found out why it doesn't work. My mp3 files are stored on a https server that requires login. On Linux and Mac URLs of the form

          https://user:password@domain.com/file.mp3

          are supported. Those are the URLs that I use. On Windows, the wmf backend does not support those URLs, I would have to use an IMFNetCredentialManager:

          https://msdn.microsoft.com/en-us/library/windows/desktop/aa473824(v=vs.85).aspx

          That seems difficult to add from the application side, probably this should be a functionality of the QtMultimedia module...? I will try to find some workaround for now, I guess.

          Peter

          http://www.peterbouda.eu

          1 Reply Last reply
          1
          • JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            @pbouda, good find.

            Would you be willing to submit a feature request to https://bugreports.qt.io/ ? Perhaps others need this feature like you.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            P 1 Reply Last reply
            0
            • JKSHJ JKSH

              @pbouda, good find.

              Would you be willing to submit a feature request to https://bugreports.qt.io/ ? Perhaps others need this feature like you.

              P Offline
              P Offline
              pbouda
              wrote on last edited by
              #6

              @JKSH good idea, I already submitted:

              https://bugreports.qt.io/browse/QTBUG-45363

              Peter

              http://www.peterbouda.eu

              1 Reply Last reply
              0

              • Login

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