[Qt-mobility-feedback] QMediaPlayer with a custom QIODevice

Seth Cousins seth.cousins at gmail.com
Thu Mar 25 16:43:33 CET 2010


Hello,

I am working with qt 4.7 trunk and trying to implement audio playback on top
of a custom QIODevice.  My implementation needs to handle local caching,
encrypted data sent over the wire, etc., so I need to reassemble the mp3
stream myself as it is handed off to the player code.

Currently I am working on a mac but the code will also target windows.

I call QMediaPlayer::setMedia and pass my object as the second parameter as
noted in qmediaplayer.cpp:

mediaPlayer->setMedia(mediaContent, pCustomSource);


However I see that the quicktime plugin is ignoring my custom mediastream
and resolving the QMediaContent object (from qt7playersession.mm):

    m_resources = content;

    m_mediaStream = stream;

    m_mediaStatus = QMediaPlayer::NoMedia;


    QNetworkRequest request;

    if (!content.isNull())

        request = content.canonicalResource().request();

    else

        return;


My stream is set to m_mediaStream and thereafter ignored.

Is there different way that I should be setting this up?  Is this
functionality just not implemented yet?  I haven't dug deeply into the
directshow plugin to see if the same is occurring there.

Thanks for any pointers,
Seth Cousins
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-mobility-feedback/attachments/20100325/f9708649/attachment.html 


More information about the Qt-mobility-feedback mailing list