Hi

I would like to use my own customized QIODevice to open a video file in QT using Phonon. This should theoretically allow me to play specially encrypted video files. I noticed that MediaSource ( QIODevice * ioDevice ) can take an QIODevice and as a test I tried a basic QFile as a source.

Qt Code:
  1. VideoPlayer* video = new VideoPlayer(Phonon::VideoCategory);
  2.  
  3. main->setWidget(video); // My own class that puts the VideoPlayer on the window at the correct position.
  4.  
  5. QFile* f = new QFile("data/myvideo.MP4");
  6. if (f->open(QIODevice::ReadOnly))
  7. {
  8. video->play(MediaSource(f));
  9. }
To copy to clipboard, switch view to plain text mode 

When I debug the code, the file opens successfully, but I only get a "black box" with no video or audio.

When I replace MediaSource(f) with MediaSource("data/myvideo.MP4"), it works but I would like to be able to modify (decrypt) the stream before it get send to the VideoPlayer.

Any ideas?