Application freeze on playing media files at MacOS



  • 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?



  • 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?



  • Thanks in advance.



  • 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)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.