Is this possible? The idea is to render a scene as a virtual webcam (the virtual webcam itself is the trivial part). My work is based off of the PushSource sample from the DirectShow SDK and the D3D11 game sample.
I know I can already copy the DIB bytes to the pointer provided by IMediaStream sample, but is there a way to use that as a render target? Or am I just better off rendering offscreen somehow and locking a D3D render target and copying it's bytes over? And if so, how do I initialize Direct3D properly for this? And how do I convert the locked rect bytes to the proper format?
EDIT: So, I figured out the windowless rendering part. My next question is can I set that pointer to the DIB as a render target, and if not then how would i go about converting my D3D11Texture2D to a usable format?
Solved. The answer is to use a Texture2d as a render target, get it's resource, and copy the resource's pData to a buffer line by line and make a DiB from that.