Create desktop video using sink writer and Desktop Duplication API RRS feed

  • Question

  • I wanted to create a video of my desktop screen using the desktop duplication api and the media foundation sdk. However, when i passed an ID3DTexture2D retrieved from IDXGIResource (returned by the IDXGIOutputDuplication::AcquireNextFrame method) to MFCreateDXGISurfaceBuffer method and then passed to a sink writer, I get the HRESULT = DXGI_ERROR_INVALID_CALL. When it does work(Somehow), It writes nothing to the file (file size 0 bytes). Could someone help me out with a working sample of how to get this done? I have been battling with this problem for a while now.
    Friday, August 15, 2014 4:04 PM