How to use the onvif library
masterUsing the library follows a four-step workflow:
- Connecting to the device: Initialize a device object using
onvif.NewDevicewith the appropriate network address and port. - Authentication: If the device requires it, provide credentials during initialization or use the
Authenticatemethod. - Defining Data Types: Create a request structure corresponding to the ONVIF service method you wish to call. Each service has its own package (e.g.,
device,ptz) containing these structures. - Carrying out the method: Execute the request by passing the defined structure to the
CallMethodfunction of the device object.