@chunks chunks - Thanks for your comments!
What are you having trouble with regarding video capture? Basically, you need to create a gpu render target texture (D3DPOOL_DEFAULT) that can be of different dimensions to the backbuffer. Then you use 'StretchRect' to blit from the backbuffer to your render target texture. This may take a while to complete so it's best to access it quite a while afterwards otherwise you'll cause stalls. To then get the data from the render target, you'd need to have created a plain texture of the same dimensions and colour format. Then you call GetRenderTargetData to transfer the data from your render target texture on the graphics card to your system ram texture.
In short...
1) Create your gpu render target texture:
D3DXCreateTexture( m_pDevice, width, height, 0, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &m_pTargetGPU );
2) Create your system ram render target texture:
D3DXCreateTexture( m_pDevice, width, height, 0, 0, D3DFMT_X8R8G8B8, D3DPOOL_SYSTEMMEM, &m_pTargetSys );
3) When you're ready, blit the contents of the backbuffer to your gpu render target:
m_pDevice->StretchRect( pBackBuffer, NULL, pSurface, NULL, D3DTEXF_NONE );
(pSurface is the top level surface of m_pTargetGpu)
4) Some time later, transfer the contents of the gpu render target to your system ram render target:
m_pDevice->GetRenderTargetData( pSrc, pDst );
(pSrc is the top level surface of m_pTargetGpu; pDst is the top level surface of m_pTargetSys)
You can now lock the system ram surface and use it to output to your avi.
You should implement some kind of thread that handles a queue of system surfaces and you should implement some kind of buffering system as you'll likely have to wait a number of frames before you can access the results of the StretchRect via GetRenderTargetData without causing stalling (it's most likely the LockRect on the system ram surface that would cause stalling if everything is not complete at this point).
If you'd originally wanted to capture video from DBPro, you'd need to look into hooking and intercepting calls to stuff like IDirect3DDevice9:: Present which is a whole other evil kettle of fish
.
EDIT: Removed double colon global scope operators on functions that cause smileys.