NDI-FIND
Parameters
Supported Values
// Create the descriptor of the object to create
NDIlib_find_create_t find_create;
find_create.show_local_sources = true;
find_create.p_groups = NULL;
// Create the instance
NDIlib_find_instance_t pFind = NDIlib_find_create_v2(&find_create);
if (!pFind)
/* Error */;
while (true) // You would not loop forever of course !
{
// Wait up till 5 seconds to check for new sources to be added or removed
if (!NDIlib_find_wait_for_sources(pFind, 5000))
{
// No new sources added!
printf("No change to the sources found.\n");
}
else
{
// Get the updated list of sources
uint32_t no_sources = 0;
const NDIlib_source_t* p_sources =
NDIlib_find_get_current_sources(pFind, &no_sources);
// Display all the sources.
printf("Network sources (%u found).\n", no_sources);
for (uint32_t i = 0; i < no_sources; i++)
printf("%u. %s\n", i + 1, p_sources[i].p_ndi_name);
}
}
// Destroy the finder when youβre all done finding things
NDIlib_find_destroy(pFind);Last updated
Was this helpful?

