Skip to content

Instantly share code, notes, and snippets.

@rvi
Last active March 19, 2018 10:02
Show Gist options
  • Save rvi/31d4bd94a3b54b41bfa5c1dfb1dcbc6b to your computer and use it in GitHub Desktop.
Save rvi/31d4bd94a3b54b41bfa5c1dfb1dcbc6b to your computer and use it in GitHub Desktop.
override fun requestPerformed(response: OnvifResponse) {
Log.d("ONVIF", "Request ${response.request.type} performed.")
Log.d("ONVIF","Succeeded: ${response.success},
message: ${response.parsingUIMessage}”)
if (response.request.type == GetServices) {
currentDevice.getDeviceInformation()
} else if (response.request.type == GetDeviceInformation) {
currentDevice.getProfiles()
} else if (response.request.type == GetProfiles) {
currentDevice.getStreamURI()
} else if (response.request.type == GetStreamURI) {
Log.d("ONVIF", "Stream URI retrieved: ${currentDevice.rtspURI}")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment