Results 1 to 3 of 3

Thread: DirectX Texture - NDI

  1. #1
    Registered User
    Join Date
    Aug 2016
    Location
    London UK
    Posts
    3

    DirectX Texture - NDI

    Hi,

    I'm using the DestkopDuplication API https://msdn.microsoft.com/en-gb/lib...(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

  2. #2
    Registered User
    Join Date
    Apr 2016
    Location
    Adelaide Australia
    Posts
    6
    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.

  3. #3
    NewTek Engineering ACross's Avatar
    Join Date
    Jul 2003
    Location
    San Antonio
    Posts
    798
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •