Added support for loading media from a QIODevice.