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()
QtWS25 Last Chance

Qt6 Replacement for QMediaPlayer::hasSupport()

Scheduled Pinned Locked Moved Unsolved General and Desktop
qmediaplayerqt5.15.0qt6.5.0
3 Posts 3 Posters 454 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.
  • F Offline
    F Offline
    flatland3r
    wrote on 19 Oct 2023, 15:16 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

    K 1 Reply Last reply 19 Oct 2023, 18:32
    0
    • F flatland3r
      19 Oct 2023, 15:16

      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

      K Offline
      K Offline
      KH-219Design
      wrote on 19 Oct 2023, 18:32 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

      S 1 Reply Last reply 19 Oct 2023, 18:54
      0
      • K KH-219Design
        19 Oct 2023, 18:32

        @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.

        S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 19 Oct 2023, 18:54 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

        1/3

        19 Oct 2023, 15:16

        • 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