Sign in to follow this  
kiske1

Video in Direct3D environment

Recommended Posts

kiske1    122
Hi, I'd wish to integrate in my D3D game, support for live video capture and for video playback...I'm actually using the code derived from the sample Texture3D9, in the SDK, but I've heard that would be a much better thing to use the new VMR9 interfaces... is it right? The functions I need are the following: - Live preview - Capturing to AVI file with preview - Playback from file - Frame Stepping (forward and backward) Could someone please give me some hints about what is the best way to do this? many thanks Juri <Kiske>

Share this post


Link to post
Share on other sites
skillfreak    160
For directx I would recommend gazing deeply into DirectShow. For DX 9, your also going to need to download the extra's sdk at microsoft which has the directshow shtuff.
Hope this helps.

Share this post


Link to post
Share on other sites
circlesoft    1178
You have a couple options for doing this:

(1) Use DirectShow (as skillfread stated) - render the video to a texture, and then render the texture (exactly like the TextureD3D9 DShow sample). Here is a recent thread about it. IIRC, someone is working on a pretty good DirectShow/Direct3D video tutorial, too.

(2) Use the Video for Windows API (vfw.lib). You can render to a texture, because all you need is its DC. To get the DC of a texture, call IDirect3DTexture9::GetSurfaceLevel() and then IDirect3DSurface9::GetDC(). I've heard this is much easier than DShow.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this