A few years back I tampered with using webcams for games in DirectX9. The idea was of course to make a game ala Eye toy games for PlayStation. However grabbing the images and loading them into a direct texture proved to be very slow so i had to give up
Then I was asked about VMR9 and it looked promising in the examples i tried. I started implementing it for Ice2D Game Engine, but couldnt make it work. First, I allocated a device for the VMR9, but quickly found out that it's not possible to move textures directly between 2 directx devices. Then i tried using the Ice2D's device for VMR9 but somehow VMR9 messed up the device so Ice2D would stop rendering. Again, I was back with nothing!
6 month later i started to think that perhaps I needed to make a IDL for directshow so i could build the render graph and use ISampleGrabber. I knew from my test with webcam that the grabber was very fast and after constructing the IDL typelibrary it became must easier to work with.
Final outcome is a fully working video and webcam rendering to a real directX9 texture with good performance and the IceVideo interface also allow you direct access to a BMP32 buffer before it's moved to the directX9 texture. This buffer access makes it possible to program simple color filters and even some webcam motion detection in real time - A real success after a long struggle.
IceVideo will be released in Ice2D Game Engine v2 - Happy New Year!