You must manage pixel data marshaling (e.g., using byte[] pinned with GCHandle ). 5. Receiving Video (Receiver) 5.1 Find Sources var sources = NDIlib.find_get_current_sources(IntPtr findInstance); foreach (var source in sources)
// Your code here
if (videoFrame.p_data != IntPtr.Zero)
1. Introduction The NDI .NET SDK v2 provides managed C#/VB.NET bindings for NewTek’s high-performance NDI protocol. It allows .NET applications to send, receive, and process video over IP with low latency.
4.1 Create a Sender var sendSettings = new NDIlib.send_create_t ndilibdotnet2
handle.Free(); Console.WriteLine("Frame sent. Press Enter to exit."); Console.ReadLine();
if (!NDIlib.initialize())
// Simulate one frame int width = 1920, height = 1080; byte[] pixelData = new byte[width * height * 4]; // RGBA black GCHandle handle = GCHandle.Alloc(pixelData, GCHandleType.Pinned);
var recvSettings = new NDIlib.recv_create_v3_t You must manage pixel data marshaling (e
var frame = new NDIlib.video_frame_v2_t
xres = 1920, yres = 1080, FourCC = NDIlib.FourCC_type_e.FourCC_type_RGBA, frame_format_type = NDIlib.frame_format_type_e.frame_format_type_progressive, timecode = 0, p_data = yourPixelBufferPtr, // IntPtr to raw RGBA data line_stride_in_bytes = 1920 * 4 ; NDIlib.send_send_video_v2(sender, ref videoFrame); Introduction The NDI