Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

screencast application at 30fps (at least)



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:

hr = D3DD9->StretchRect(pRenderTarget, NULL, (IDirect3DSurface9 *)(pmfxSurfacesVPPIn[nVPPSurfIdx]->Data.MemId), NULL, D3DTEXF_NONE);

hr result is 0x8876086c

What's wrong with my approach? Is it possible to copy directly from video memory to VPP's input? If my approach is wrong, what can I do to achieve 30fps at least?



0 Kudos
0 Replies