NDI SDK mac questions


New member

I've just started having a play with the NDI macos SDK with a view to integrating into an existing objective C application.

I've managed to adapt the NDI Send Video advanced code to work from within a bare bones cocoa application but am currently finding that it is taking around 10 seconds to send each frame - I am sending this using "p_NDILib->NDIlib_send_send_video_v2(pNDI_send, &NDI_video_frame);" and the frame is of RGBA type.

To get the code to work I have been calling the original main loop from within my application on a background thread, via a call from an objective C++ .mm class (in this case a view controller) however I suspect this is not the best approach. What is the best method to call the NDI loop? If anyone can point me in the right direction it would be much appreciated! I suspect I need to call via an NSRunLoop but let me know if I'm wrong..


Last edited:


New member
Looking at it again the issue actually seems to be with the code:
if (!p_NDILib->NDIlib_send_get_no_connections(pNDI_send, 10000))
{ // Display status
printf("No current connections, so no rendering needed .\n");

which seems to be waiting 10 seconds before continuing (even when there is a connection), even though it should be waiting for 10 seconds to find a connection.


New member
I suppose my question is, should I be testing to see if there are listeners (connections) on every frame, or should I test only every so often and in another thread?
Top Bottom