Delphi Media Player Visualizations

Windows Media Player 7 and above allows developers to write plugin visualizations. Microsoft claim you can only write these using Visual C++. This is a lie, as they are just COM DLLs, but MS don't provide a type library for the required interface. I've translated the C++ version and written a sample visualization. Here's whats I've done

WMPEffects unit

This contains the definition of the IWMPEffects and IWMPEffects2 interfaces. IWMPEffects2 is only available in Media Player 9, but provides access to the full Media Player object hierarchy, meaning your visualization could be pretty cool

WMPLib_TLB unit

The Media Player 9 type library (needed by the IWMPEffects2 interface)

VisImpl unit

The implementation of the visualization

Download the source code here.
After compiling it, register it using the command line tool regsvr32 (just type "regsvr32 DoogalsVisualization.dll" from the project directory) and it should appear in Media Player.

One question that has come up a few times is whether it is possible to automatically display the visualization in your own hosted Media Player ActiveX control. As far as I can see, this isn't possible since the Media Player API doesn't provide a way to do it. If anybody knows of a way to achieve this, I'd love to know.