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. Adding custom video format to Qt using QtMultimedia

Adding custom video format to Qt using QtMultimedia

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 787 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.
  • B Offline
    B Offline
    bludger
    wrote on 29 Aug 2017, 18:31 last edited by
    #1

    Hi all,

    I've a proprietary video format and need to implement it in Qt. As always there are multiple solutions available. This time I picked the one to implement my custom QMediaService and QMediaObjects.
    Unfortunally I cannot play it. My observations:

    1. Qt loads the plugin (metadata contains the org.qt-project.qt.mediaplayer service)
    2. Qt loads the system plugin (DirectShow plugin)
    3. Playback file does have a custom file format and mime type, registered by creating an additional mime type database according to the docs (XML)
    4. Plugin provides the Playback feature
    5. Plugin provides the QMediaServiceSupportedFormatsInterface (for the specific mime type)
    6. The provided QVideoRendererControl in my plugin is never called, instead Qt picks DirectShow to try playback

    It seems that QMediaPlayer is careless when it comes to mime types. It just picks the first available media service and tries it. And if it fails then that's it.

    Some extra information regarding my system:
    Windows 8.1
    Visual Studio 2015
    Qt 5.9.0 (x86 build as provided by Qt)

    Did someone encountered the same problem and have some advice to tackle it? Or did I just stumble upon a Qt bug / design issue?

    Another option would be not using the plugin system, but hey I thought it is made for it, so lets try it out...

    Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 30 Aug 2017, 12:13 last edited by
      #2

      Hi,

      As a workaround, you can move the Qt plugins out of the corresponding folder so yours can be loaded.

      You situation is likely related to this QTBUG-32783.

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

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bludger
        wrote on 30 Aug 2017, 12:43 last edited by
        #3

        Thanks, didn't found the mentioned bugreport earlier. Probably due to it is not on the QMultimedia board.
        It is not the workaround I'm looking for because the support for all other formats are gone then. For know I will make a custom QObject that can be attached to a VideoOutput object. That's ok for now.

        1 Reply Last reply
        0

        1/3

        29 Aug 2017, 18:31

        • Login

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