Unable to draw the texture from the surface pointer in EVR custom presenter of WPF media kit

Jun 7, 2012 at 7:20 AM

Hi, I want to draw the surface of the video got from PresentSurfaceCB(IntPtr pSurface) function  in the Evr presenter class of WPF mediaKit onto a texture of  directx 9. I am using slimdx framework  for directx 9. When I am doing this by the help of follwing two lines 

   _surface = Surface.FromPointer(pSurface);

 _texture = _surface.GetContainer<Texture>(); 

an exception is being thrown i.e "E_NOINTERFACE: The requested COM interface is not available (-2147467262)".

I am unable to find out the reason for this as the same thing was working fine with VMR9 surface allocator when i was drawing the surface onto the texture.

Can any one please tell me the reason behind this and any solution for this.