Using Media Foundation to encode Direct X surfaces
问题 I'm trying to use the MediaFoundation API to encode a video but I'm having problems pushing the samples to the SinkWriter. I'm getting the frames to encode through the Desktop Duplication API. What I end up with is an ID3D11Texture2D with the desktop image in it. I'm trying to create an IMFVideoSample containing this surface and then push that video sample to a SinkWriter. I've tried going about this in different ways: I called MFCreateVideoSampleFromSurface(texture, &pSample) where texture