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. Qt6 Replacement for QMediaPlayer::hasSupport()
Forum Updated to NodeBB v4.3 + New Features

Qt6 Replacement for QMediaPlayer::hasSupport()

Scheduled Pinned Locked Moved Unsolved General and Desktop
qmediaplayerqt5.15.0qt6.5.0
3 Posts 3 Posters 502 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.
  • F Offline
    F Offline
    flatland3r
    wrote on last edited by
    #1

    QMediaPlayer::hasSupport() has been removed in Qt6 and the Qt5 docs make no mention of its obsolescence or a suggested replacement. How can I replicate this functionality in Qt6?

    I searched the following doc pages:
    https://doc.qt.io/qt-5/qmediaplayer-obsolete.html
    https://doc.qt.io/qt-5/qmediaplayer.html

    KH-219DesignK 1 Reply Last reply
    0
    • F flatland3r

      QMediaPlayer::hasSupport() has been removed in Qt6 and the Qt5 docs make no mention of its obsolescence or a suggested replacement. How can I replicate this functionality in Qt6?

      I searched the following doc pages:
      https://doc.qt.io/qt-5/qmediaplayer-obsolete.html
      https://doc.qt.io/qt-5/qmediaplayer.html

      KH-219DesignK Offline
      KH-219DesignK Offline
      KH-219Design
      wrote on last edited by
      #2

      @flatland3r It certainly would be helpful to hear an answer on this from the Qt team.

      I can only speak for myself and say what I would do if I were "in dire straights" and forced to get something working in a way that replicated Qt5 functionality.

      Assuming I only really needed 1 or 2 lower-level media backends, I would look at what Qt5 was actually doing, and base my new approach on that.

      It seems that Qt5 (as I would have expected) is querying lower-level media platform libraries to see what those libraries report as supported.

      Some examples:

      • https://github.com/qt/qtmultimedia/blob/5.15/src/gsttools/qgstutils.cpp#L805
      • https://github.com/qt/qtmultimedia/blob/5.15/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm#L94

      I am not suggesting that anyone copy-and-paste. Consult licensing restrictions. I am only suggesting to become aware of what the lower-level platform media libraries provide in terms of querying support of different media types.

      www.219design.com
      Software | Electrical | Mechanical | Product Design

      SGaistS 1 Reply Last reply
      0
      • KH-219DesignK KH-219Design

        @flatland3r It certainly would be helpful to hear an answer on this from the Qt team.

        I can only speak for myself and say what I would do if I were "in dire straights" and forced to get something working in a way that replicated Qt5 functionality.

        Assuming I only really needed 1 or 2 lower-level media backends, I would look at what Qt5 was actually doing, and base my new approach on that.

        It seems that Qt5 (as I would have expected) is querying lower-level media platform libraries to see what those libraries report as supported.

        Some examples:

        • https://github.com/qt/qtmultimedia/blob/5.15/src/gsttools/qgstutils.cpp#L805
        • https://github.com/qt/qtmultimedia/blob/5.15/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm#L94

        I am not suggesting that anyone copy-and-paste. Consult licensing restrictions. I am only suggesting to become aware of what the lower-level platform media libraries provide in terms of querying support of different media types.

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        To add to @KH-219Design, since 6.5, the default backend has been set to ffmpeg.

        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

        • Login

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