
One of the things I've been working on a lot lately is to make KIO work seamlessly with Phonon. The idea is that you can throw any URL at a MediaObject and it will work even if the mediaframework used by the backend doesn't support the given protocol. A protocol that isn't supported by Xine, for example, is sftp://. MediaObject handles those URLs by first trying whether the backend will play the URL without further help, if that doesn't work it asks the backend to create a ByteStream object which provides an interface for streaming the media data using QByteArrays. It then sets up a KIO::FileJob (the new one that supports seeking) or KIO::TransferJob if the protocol doesn't support seeking and connects the data and flow control signals accordingly.
Phonon-NMM was the first backend to implement the ByteStream interface and supports non-seeking transfers so far (it was written when KIO was not able to seek at all). Phonon-Xine is the second to follow, this time also with seeking support. Implementing this class for Xine was a major headache because of the undocumented threading issues - with both the KIO transfer and the xinelib calls being asynchronous (the latter was not expected from the documentation) there are so many things that you can do wrong...