Previous Topic

Next Topic

Book Contents

Book Index

Managing Cameras

Cameras module can be part of a gateway and remote users can access the cameras in the gateway's private network.

Control Servlet

The Cameras Manager Bundle registers a ControlServlet for controlling the cameras over HTTP proxy. When you request an action from a specified camera, it is read through the API implementation and forwarded to you through the proxy servlet. The HTTP API is simple and uses the following URI syntax:

/<path>/<action>/<cameraID>?<param1>=<value1>&<param2>=<value2>, where <action> can take the following values:

Action

Description

Parameters

image

It serves a still image snapshot using the StillImageControl interface.

All passed parameters are also passed to the getImage(Map) method as parameters map.

video

It serves a video snapshot using the VideoControl interface.

All passed parameters are also passed to the getVideo(Map) method as parameters map.

record

It serves an image and video recording using the RecordControl interface.

All passed parameters are also passed to the getRecord(Map) method as parameters map.

Adding and Removing Camera Devices

The adding operation is introduced to meet cases when the underlying protocol does not imply automatic detection of newly-joined camera devices.

Camera Controls

The Cameras module contains a flexible Cameras 3.0 API, whose functionality is to sustain various types of controls. The supported camera drivers implement only the controls provided by the module's API in order to get camera's content or to control the camera. Every camera control implements a CameraControl sub-interface, which defines a control for:

Camera Drivers

The main goal of the camera drivers is to have a common representation of all kind of cameras, no matter what kind of communication, control and content delivery mechanism is used. The camera driver:

The Cameras Module implements the following camera drivers:

Getting Notifications for Changes in the Camera Set

When a camera is added, updated, or removed an asynchronous event is fired and published by the OSGi Event Admin service. To receive such events through the OSGi Event Admin, you have to implement an org.osgi.service.event.EventHandler interface. The EventHandler service must be registered with the EVENT_TOPIC_ADDED and EVENT_TOPIC_REMOVED topics. In order to specify which camera has issued the event, from the passed Event object is processed the CamerasManager.EVENT_PROPERTY_CAMERA_ID property. The property's Long value provides the ID of the camera.

User Interface

For managing camera devices you can use text commands in the OSGi runtime console. The cameras commands are provided by the Cameras Console Commands bundle (bundles/com.prosyst.mbs.cameras.driver.commands.jar) and are separated in a group, called cameras. See the "Management via Text Console" document for more details on the commands' usage.

Demos

The Cameras Module contains demos illustrating the usage of the API. You can examine them in Eclipse to see java code samples for the following implementations:

Configuring Debug and Proxy

You can activate the generation of debug information about the operation of the cameras manager through the com.prosyst.mbs.cameras.driver.core.logLevel system property found in the common.prs file in the bin/vms directory. Set the property with value 4, which stands for DEBUG.

System properties can be also used for configuring the proxy settings. For more information refer to "Configuration Properties" section in the Setup Guide.