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. QAudioDecoder more definitive error?
Forum Updated to NodeBB v4.3 + New Features

QAudioDecoder more definitive error?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 199 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.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by
    #1

    if a media type "doesn't contain an audio stream", we get an error of "Format"
    but we can get "Format" errors for any number of things, not just because it's a valid media type (like mp4) that happens to not have an audio track.

    so, in using QAudioDecoder to ask questions (not QMediaPlayer), can i get a more definitive error than that, telling me precisely that the media doesn't have audio, and not just that there is a Format error?

    i know i can read the error STRING, but that feels hacky, because strings can and do change, especially if we're running in another language, so i don't feel i can rely on asking if the error string contains "doesn't contain an audio stream".

    To be clear, i do not wish to use QMeidaPlayer, which i understand is capable of asking this question.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I think you would need to modify that in the backend code directly as from a quick look, it's there that the error is handled.

      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
      1
      • D Offline
        D Offline
        davecotter
        wrote on last edited by
        #3

        yeah bummer. looks like QMediaPlayer is the only way to get the answer

        1 Reply Last reply
        0
        • D davecotter has marked this topic as solved on

        • Login

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