WMCreateStreamForURL is called in XP and Vista but not in Windows 7

It is always possible to write our own storage system for Windows media files and make the content available to users via streaming. A possibility of doing this is to write our own source plug-in as a DLL, which should implements the Istream interface and make its presence known to the SDK using a registry entry. The most important step is that the source plug-in should implement the WMCreateStreamForURL function.

For reference you can go to the MSDN link http://msdn.microsoft.com/en-us/library/dd743738(VS.85).aspx, which elaborates these steps.

However if you register a scheme for Windows Media Player version 12 (on Windows 7) to play WMV files, you would see that WMCreateStreamForURL is not being called. This is because the content being a WMV file, it is being played via Media Foundation which isn’t calling WMCreateStreamForURL.

The way to work around this for Windows 7 is by registering a MF scheme handler, which can build an MF byte stream.

For a detailed description please see the MSDN link http://msdn.microsoft.com/en-us/library/aa371872(VS.85).aspx.

-Shamik Misra

Comments (0)