Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Extending QtMultimedia to support streams over a new protocol
I'm looking for a way to play an audio or video stream that is delivered by a reliable protocol (e.g. "foo") over UDP. I'd like to be able to give a URL of the form "foo://ip-address:port" to any Qt-based media player and for the player to do the right thing.
I've looked into QAbstractSocket and QUdpSocket as the basis for implementing access to my transport protocol. That part is easy.
I don't see how to tell Qt that "foo://ip-address:port" means to instantiate one of my transport objects.
I'll be grateful for any help you can offer.
AcerExtensa last edited by
What do you mean "to tell Qt .. instantiate one of my transport objects."? If you have implemented own Socket protocol, you should handle user input for right URL and handle it....
Or you want to open your App when user inputs "foo://..." somewhere in browser or explorer? If so, look here:http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx
I'm not writing media player application. I'm writing a transport for streaming media. I want this to new transport to integrate seamlessly with existing players.
For example, suppose I want the Qt-based Internet Radio application on my phone to play the stream at the URL "foo://192.168.1.100:4444". The app is probably doing something like this:
QMediaPlayer *player = ...;
I want QtMultimedia to instantiate one of my transport objects (the "foo:" part of the URL), then read audio or video or whatever comes over it. QMediaPlayer::setMedia() already knows about "http:" and "file:". My question is how do I tell QtMultimedia to do with my "foo:" URLs?
I got some advice on #qt at freenode.net. It seems that what I want to do is beyond the scope of Qt.
One suggestion from #qt is to write a proxy for my protocol and let existing apps access it in ways they understand, such as via http.
Each platform, apparently, has its own way of defining and instantiating protocol handlers. I might be able to do that for each of the platforms that interest me. Again, this is outside of the scope of Qt.
I don't want to give up on this so easily. Suppose a new type of scheme is adopted universally. How would Qt applications know about this? Where is it described to them so that they can create and use this new scheme in a Qurl? There has to be something inside of Qt. It would be a real shame if that something isn't extensible by developers like me. Is this even the right place to discuss it?
andre last edited by
Well, perhaps you are thinking of something like KDE's KIO?