I am developing am OpenGL application using Openframeworks and C++ and I am having a problem with "NDIlib_find_get_sources".
The "NDIlib_Recv" example creates a finder, waits to find a network source with a 10000msec timeout, then destroys the finder. The result is that it quits the loop as soon as it gets a sender.
First I used the same code, but it always of course breaks as soon as it gets one sender and what I want to do is get all the senders on the network and monitor them as they are added and deleted.
To explain further, I am doing this in the Openframeworks draw cycle which is clocked at 60fps.
Then I kept the example code the same but changed the "NDIlib_find_get_sources" function for zero timeout. But it makes no difference, because again it breaks when it finds the first sender. I assume that is because it is a new finder and it takes time for the finder to discover all sources on the network. The problem is we never know in advance how many senders are on the network.
So then I created a finder and left it rather than destroying it on very cycle. This works just fine and as senders are added, the count increases.
However, when a sender is closed, the count is not reduced and stays at whatever it was. So I can monitor additions but not deletions.
Can anyone help me out on how to monitor the network source additions and removals. The "Video Monitor" application does it just fine and that is that I want to achieve.
The "NDIlib_Recv" example creates a finder, waits to find a network source with a 10000msec timeout, then destroys the finder. The result is that it quits the loop as soon as it gets a sender.
First I used the same code, but it always of course breaks as soon as it gets one sender and what I want to do is get all the senders on the network and monitor them as they are added and deleted.
To explain further, I am doing this in the Openframeworks draw cycle which is clocked at 60fps.
Then I kept the example code the same but changed the "NDIlib_find_get_sources" function for zero timeout. But it makes no difference, because again it breaks when it finds the first sender. I assume that is because it is a new finder and it takes time for the finder to discover all sources on the network. The problem is we never know in advance how many senders are on the network.
So then I created a finder and left it rather than destroying it on very cycle. This works just fine and as senders are added, the count increases.
However, when a sender is closed, the count is not reduced and stays at whatever it was. So I can monitor additions but not deletions.
Can anyone help me out on how to monitor the network source additions and removals. The "Video Monitor" application does it just fine and that is that I want to achieve.
Last edited: