By default, you should get a list of available NDI streams by enumerating the "video::line-in" property or with the DeviceGetCount method. It works when you don't know the exact name of a stream you need to connect. But if you know the stream name and the machine name to receive a stream from, you can directly set the stream name and wait for the stream is available.
For this, you should do the following:
Set in the system registry:
By this, you disable the feature of connecting to the 1st available stream when you start the NDI input. Also, you minimize the time for enumeration of the input streams.
On the source code, you can do it like this:
myLive.DeviceSet("", "NDI Receiver", "ndi_auto_connect=false ndi_enum_wait_sec=0");
myLive.DeviceSet("", int_NDI_index, "ndi_auto_connect=false ndi_enum_wait_sec=0");
Once it is done, you can set the direct input stream name:
myLive.PropsSet("device::line-in", "MY_MACHINE_NAME (my_NDI_stream_name)");
myLive.PropsSet("line-in", "MY_MACHINE_NAME (my_NDI_stream_name)");