Creating New ONVIF Device Objects
To create new instances of ONVIF device objects, e.g. a camera, your Java application first needs to obtain the provided OSGI service com.prosyst.mbs.services.onvif.OnvifFactory. As a next step, invoke the service method "login" using the IP address and login credentials of the specific ONVIF camera device.
Obtaining ONVIF Services
ONVIF Services can be obtained in two different ways - either by invoking the method getServices() or the method getService(Class<C> type)and providing the service class name as a parameter.
Device Management and Network Configuration
Device management and network configuration can be accessed through the DeviceService which can be obtained by invoking the method OnvifDevice.getService(DeviceService.class).
Media Configuration
Video stream configuration and image and video streaming can be accessed through the MediaService.
Getting Image Snapshots
To receive an image snapshot from the camera follow these steps:
Getting Video Stream
To receive Video Stream as a URL, call the method getStreamUri of MediaSubService.
Pan-Tilt-Zoom Configuration
PtzService allows configuring the Pan-Tilt-Zoom camera functionality. Pan-Tilt-Zoom functions if supported by the camera can be invoked using the PtzSubService which is obtained from the PtzService.getSubService() method.
Motion Alarm Events
Motion Alarm events can be received by registering the OSGi EventHandler service with topic com.prosyst.mbs.services.onvif.EventConstants.TOPIC_NOTIFICATION
The received event of a typical ONVIF motion alarm will have the following properties