Trent Lillehaugen
Red Team
- Joined
- Aug 22, 2011
- Messages
- 1,172
- Reaction score
- 0
- Points
- 0
Which is why I'm asking for a few small changes to the API to keep it constant.
I feel like the camera API from what I'm learning make sense, it's just the discovery functions that are a bit too high level. Specifically the fact that you can only perform one discovery at a time since the discovery list is a single block of memory. I could also probably manage the memory better from an application level since I could make it something like .NET's ConcurrentBag<t> which is automatically thread safe. All I really need from the API is the conversion from packet to cam_info_t. I can also then throw in callbacks to aysnchronously populate a camera list as cameras are discovered instead of querying the entire list.
async task OnCamDiscovered(void)
{
UpdateUIList();
}
I can also that way have multiple discoveries on multiple interfaces concurrently.
You bring up a good point. I know foolcontrol even implements its own discovery process since the HOTLINK/HOTBOX solutions don't respond to the broadcast UDP that we use for discovery - so it scans all address on the subnet.
I will look into somehow addressing this in future releases on the API.