DX9 Getting a Video on Texture

Started by
3 comments, last by Kjell Andersson 10 years, 8 months ago

Hey,

so I'm looking for a way to render multiple video files (at the same time) on textures in realtime. In my old OpenGL applications I did in delphi I was using an AVI API to read the Framebuffer directly to the TextureMemory. This was ok, but with a lot of codec problems.. So for now SlimDX and DirectX 9 in .NET I'm looking for a better and cleaner way. I have found a lot about DirectShow.NET but its not really clear to me how to use it with SlimDX. Does anybody have a tutorial or Demo shows me how to use it?

Thx,

Thomas

Advertisement
I'd recommend you check out the Texture3D9 DirectShow Sample. You could write a C++/CLI dll to wrap the C++ code with a .NET interface. From that you can just 'new' it like a regular object.

I have downloaded the Platform SDK for win7 but cannot find this sample.. Or is there maybe an easier solution as with DirectShow?

Eww, I don't recommend DirectShow, I've had a magnitude of problems errupt with that when using it with DirectX 9.

If you want a fully hardware accelerated video solution you will need to look at writing a custom EVR presenter which will provide the rendered video to you as an off-screen texture.

EVR presenters can be used with both the DirectShow and Media Foundation frameworks.

links:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb530107%28v=vs.85%29.aspx

http://msdn.microsoft.com/en-us/library/windows/desktop/bb970434%28v=vs.85%29.aspx

You can also have a look at MediaKit which probably does alot of what you need to be doing:

http://wpfmediakit.codeplex.com/

This topic is closed to new replies.

Advertisement