2008-11-01

An extensible way to make filestreams.

A couple of weeks ago we where talking on the irc about how we should implement streaming from http or other protocols. I've seen other implementations where it's been implemented on the decoder side so that basically the mp3 decoder will be able to receive a http address or a link to a file.
We didn't think this was flexible enough and decided to make our own filestream class that could be extended to use any type of protocol.
The implementation turned out to be very simple, the only hard work we needed to do was to send a IFileStream object to the decoders and use that instead of sending the path to the file. Luckily most decoders has thought about this and have ways to hook all calls to the streams.

So now mC2 is able to stream anything as long as it has a decoder for it, and implementing new type of protocols is a breeze.

More information can be found at the mC2 wiki.

No comments:

Post a Comment