DirectX Texture - NDI

Harvey3141

New member
Hi,

I'm using the DestkopDuplication API https://msdn.microsoft.com/en-gb/library/windows/desktop/hh404487(v=vs.85).aspx to capture a destkop and would like to then send this using NDI. I've tried to keep it simple to start with and have added the desktop duplication code to the Send Video example included in the NDI SDK, I'm trying to read the data from a DirectX texture which has the desktop backbuffer however currently all I can see in the Video Monitor app is grey, I believe the sender is being created, however the data is not correct.

Do you have any examples of copying from a DirectX texture, specifically with DXGI_FORMAT_B8G8R8A8_UNORM format, into a byte array for use with NDI?

Thanks,

Harvey
 

leadedge

New member
Maybe you have already tried it, but what you need is a DirectX staging texture. Then you can map it for read and get a pointer to the pixels which can be used directly for the video frame pointer in NDIlib_send_send_video. I have working example code and will send you a private message.
 

ACross

NewTek Engineering
Leadedge is giving the correct way to handle this. You probably want to ping-pong between a few textures to get the best performance. In addition, if you can get the color conversion to UYVY done on the GPU then you'll probably double your performance.
 
Top Bottom