Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. QMediaPlayer::setSourceDevice() sourceUrl MIME type format?
Forum Updated to NodeBB v4.3 + New Features

QMediaPlayer::setSourceDevice() sourceUrl MIME type format?

Scheduled Pinned Locked Moved Solved Qt 6
2 Posts 1 Posters 444 Views 1 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.
  • M Offline
    M Offline
    Monni
    wrote on last edited by
    #1

    Hi!

    This may be a dumb question, but I'm trying to implement media streaming in my application and want to play binary mpeg-ts data stream with QMediaPlayer.

    Documentation says this for the setSourceDevice() function parameter sourceUrl:

    The sourceUrl can be provided to resolve additional information about the media, mime type etc.
    

    I can't quite get how MIME type should be added to the QUrl, I haven't really encountered an url where MIME type is present. Do I even need to use this parameter for this kind of encoded binary data stream, and if yes, then how should I be specifying this information to sourceUrl?

    I tried to eyeball the source code, but I didn't quite get with my limited knowledge in Qt Multimedia where that information is parsed and used.

    Thanks in advance for any help with this! It has had me going circles for a while.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Monni
      wrote on last edited by Monni
      #2

      I scoured through the source code more and found out that there is apparently currently no support to play from a QIODevice, only from either a network url, a qrc-baked file or a local file. I eventually resorted to writing QIODevice output to localhost port as UDP packages and read the videostream from there, data happened to already be in mpeg-ts format.

      Still no idea how the mention of adding mime type information would work, but it's now obsolete need for my project.

      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