[Interest] Accessing custum url types for Media Player

Pasiak, Emily EPasiak at neptec.com
Tue Mar 14 17:04:00 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/20170314/773164a6/attachment.html>


More information about the Interest mailing list