I have to read encrypted music or video from USB drive, decrypt it on the fly as a stream, and send it to mp3 player.
I can already read the file from the USB and decrypt it on the fly in chunks, but now I need to send the chunked data somewhere to play it, for example windows media player (WMP).
WMP requires a URL to the music/video source, so I figure I would create a stream in memory and give that to WMP as the URL. Then when WMP starts reading from the stream, it would somehow call my function which would then read a chunk of data from the USB, decrypt it, and put it to the stream to be played by WMP.
Anybody knows how to create a URL stream, and then get notified when the stream wants data?
Im using Visual C++ MFC/Win32.
Thanks