Skip to content

ONVIF Cameras Discovery

ONVIF Cameras Network Discovery

It is possible to discover the ONVIF cameras in Multicast mode, by scanning a range of IP addresses, or both by invoking both functions consecutively.

The discovery is performed in the background.

Starting the discovery

  • to discover the ONVIF cameras through a multicast request, invoke:

ONVIFDiscoverCameras_Multicast (timeout_seconds)

  • to discover the ONVIF cameras through a range of IP addresses, invoke:

ONVIFDiscoverCameras_IPRange (first_IP, last_IP, timeout_seconds)

Note: a timeout of 2 to 5 seconds should be sufficient.

Stopping the discovery before its completion

Results of the discovery

From any of these events it is possible to invoke ONVIFEnumCamerasDiscovered for each camera whose index is specified by the CameraIndex parameter. When CameraIndex >= the number of cameras the function returns false

The sample code is included in the Delphi and C# MainDemo projects.