I'm developing a screencast program capturing screen using Direct3D9. My first approach, capturing the screen with getfrontbuffer() Direct3d function and moving screen from video to system memory, gives me around 15fps.
I'd like to reach at least to 30 fps so youtube videos could be seen fluidly. For that, I have measured the bottleneck and discovered that it is the video to system memory transfer, so I'm copying from video memory to video memory. Currently I'm trying to capture the screen using getbackbuffer() function (as it seems that getfrontbuffer() doesn't work with D3DPOOL_DEFAULT memory) and then copying the surface where the screen has been captured to the VPP's input buffer with StretchRect() D3D9 funcion.
I'm using the code from tutorial in folder simple_6_encode - d3d - vpp_preproc. Also I'm copying from my surface to the VPP's input surface directly: