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. Application freeze on playing media files at MacOS
Qt 6.11 is out! See what's new in the release blog

Application freeze on playing media files at MacOS

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.8k 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
    mykhailo
    wrote on last edited by
    #1

    Hi,

    I use phonon for playing audio notes. Files are located at web server so I use HTTP as media source.
    @
    m_audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
    m_mediaObject = new Phonon::MediaObject(this);
    Phonon::createPath(m_mediaObject, m_audioOutput);
    m_mediaObject.setCurrentSource(Phonon::MediaSource(QUrl("http://example.com/1.wav")));
    @
    After I call setCurrentSource program freeze.

    Playing local files works good. Everything also works on Windows so I think that problem maybe in QT backend.

    Can you help me or tell any workaround for this problem?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rh_milan
      wrote on last edited by
      #2

      I too face the similar issue. Everything works fine on Windows. But, on Mac MediaObject fetches all the data while doing setCurrentSource(), till then it is blocked.

      I found similar post from Jan 2010:
      http://www.qtcentre.org/threads/27654-Override-streaming-in-QuickTime-phonon-backend

      Could anyone please guide us if there is any solution/work around for this?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rh_milan
        wrote on last edited by
        #3

        Thanks in advance.

        1 Reply Last reply
        0
        • I Offline
          I Offline
          inspired
          wrote on last edited by
          #4

          well, for everyone searching and stumbling upon this:

          i had a similar experience with this, developing my app in windows, running fine, but compiled in mac, and crashes at setCurrentSource()..
          for some reason calling m_mediaObject.clearQueue(); just before calling setCurrentSource() seems to do the trick... (don't know why, it's stupid, however no more crashing just by adding this line)

          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