Console.WriteLine($"source.p_ndi_name @ source.ip_address");
sample_rate = 48000, no_channels = 2, no_samples = 960, // 20ms @ 48kHz timecode = 0, p_data = audioDataPtr ; NDIlib.send_send_audio_v2(sender, ref audioFrame); Send:
if (!NDIlib.initialize())
static void Main()
Audio Sending var audioFrame = new NDIlib.audio_frame_v2_t
p_ndi_name = "My .NET Sender", // visible on network p_groups = null, // optional group filtering clock_video = true, // auto timestamp clock_audio = true ; IntPtr sender = NDIlib.send_create(ref sendSettings); // Prepare frame (e.g., 1920x1080, RGBA) var videoFrame = new NDIlib.video_frame_v2_t
var frame = new NDIlib.video_frame_v2_t
using NewTek.NDI; class Program
4.1 Create a Sender var sendSettings = new NDIlib.send_create_t
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) ndilibdotnet2
handle.Free(); Console.WriteLine("Frame sent. Press Enter to exit."); Console.ReadLine();
if (videoFrame.p_data != IntPtr.Zero)
// Your code here
source_to_connect_to = selectedSource, color_format = NDIlib.recv_color_format_e.recv_color_format_RGBX_RGBA, bandwidth = NDIlib.recv_bandwidth_e.recv_bandwidth_highest, allow_video_fields = true ; IntPtr receiver = NDIlib.recv_create_v3(ref recvSettings); while (running)