This chapter provides an overview of the Cisco VSM APIs and includes the following sections:
•URL-Based Media Server API commands
•AxClient API Methods
URL-Based Media Server API commands
Media server commands are URL-based API commands that are neither application-platform nor programming language specific. Commands are sent to dynamically loaded modules (for example, info.bwt, command.bwt, and event.bwt) on the media server using arguments in the form of name-value pairs. You can issue server API commands either manually or programmatically after an HTTP connection is established.
This section describes the four following server API command types:
Cisco Video Surveillance Media Server (VSMS) commands perform the following media server-related functions:
•Retrieves the VSMS version
•Retrieves Session Description Protocol (SDP) information from a video stream
•Retrieves a Real Time Streaming Protocol (RTSP) stream for a third party video player
•Configures camera features, such as enabling or disabling backlight compensation or digital zoom
•Controls camera functions, such as PTZ movement, iris control, and focus
For more information on VSMS commands, see Chapter 2 "VSMS Commands."
Proxy commands perform the following proxy-related functions:
•Starts, stops, or updates a proxy
•Views JPEG frames
•Lists all proxies
•Retrieves information about a proxy, such as its media source, media type, framerate or bitrate, video width or height, and status value.
For more information on proxy commands, see Chapter 3 "Proxy Commands."
Archive commands perform the following archive-related functions:
•Starts, stops, updates, renames, or removes an archive
•Lists all archives
•Creates an archive clip
•Retrieves information about an archive, such as its media type value, performance information, or details.
For more information on archive commands, see Chapter 4 "Archive Commands."
Event commands perform the following event-related functions:
•Sets up, enables, disables, or removes an event
•Triggers an event
•Starts and stops an event-based clip
•Retrieves event information
For more information on event commands, see Chapter 5 "Event Commands."
AxClient API Methods
VSM AxClient is an ActiveX-based API that is installed on a video surveillance client workstation, and it is used to control video operations (such as starting, pausing fast-forwarding, reversing, or stopping video streams), obtain information about AxClient or video streams, create clips and snapshots, control VMR display, and set up callbacks.
Programming Notes for C#
The AXClient is written in C++ and inherently has different object types than C#. Many return values are different objects than referenced in the API documentation. Specifically:
•Return values of types date will return to C# as System.DateTime.
•Return values of types int, short and long will return to C# as System.Int32.
// AXClient instantiation
id="AXClient" name="AXClient" viewastext="true" width="350" height="280">
// Static Properties
<param name="name" value="AXClient" />
<param name="EnableDvrMode" value="false"/>
<param name="EnableVMRMode" value="false"/>
// Setup Callbacks
<param name="OnPlayerLoaded" value="userDefinedCallbackMethod"/>
// Default Values
<param name="timestamp" value="0"/>
Note The AXClient version number will change from this documentation depending on which version of the AXClient is being used to develop against. The sample instantiation code above does not work around a known Microsoft Internet Explorer issue involving activating ActiveX Controls.
Text Part Number: