[Interest] Accessing custome url types for Media Player

Pasiak, Emily EPasiak at neptec.com
Mon Mar 13 18:34:54 CET 2017


I want to use a Video/MediaPlayer QML element in my app, and have it play a video from a custom stream. QMediaPlayer seems to support this since you can tell it to read from a QIODevice which can do anything you want. But MediaPlayer only supports a URL.

Is there any way I can register my own URL scheme that uses my own streaming protocol? For example, say I wanted to make rtsp2://..., could I do something vaguely like:

class Rtsp2 : public QIODevice
{
    // open, read, seek, close, etc.
}

QCoreApplication::registerUrlProtocol("rtsp2", Rtsp2);

Thanks for your help! :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170313/1b6e50e2/attachment.html>


More information about the Interest mailing list