Evolution of the Pelco SDK
This document discusses the evolution of the Pelco SDK in order to help integration developers understand what features and components have recently changed, and how these changes may affect existing integrations. Developers who are already familiar with the Pelco API may prefer to skip the first section, Pelco SDK vs. Pelco API.
Pelco SDK vs. Pelco API
The Pelco SDK provides libraries and components that enable a developer to interact with Pelco devices and systems from within an application. The components map to common use cases such as starting and displaying a video stream, obtaining a list of attached devices, listening for events, exporting a video clip, and so on. Some components of the SDK run independently once setup and provide status information on demand. For example, the Exporter can start an export in a separate thread and run to completion. The application can poll for the current status of the export and respond appropriately.
Contrast this with the Pelco API, which is a set of web services that require the use of SOAP for communication. SOAP (and by extension the Pelco API) puts all of the “state” and threading responsibility on the application developer. For integration developers who have previously created web service-based applications, working with the Pelco API is straightforward. Another advantage is that web services are supported in most popular programming languages on all common operating systems. However, the Pelco API can present a challenge to developers who have never worked with web services. More information about the Pelco API, including sample code, can be found on the Pelco API page.
The remainder of this document focuses on the Pelco SDK starting with version 2.0.
What is in the Pelco SDK?
Pelco SDK 2.x includes pre-built components that a developer can use in an application. These components map to common use cases such as starting and displaying a video stream, obtaining a list of attached devices, listening for events, exporting a video clip, and so on. To accomplish this an SDK component might expose an interface that requires the implementation of a callback, provide a wrapper object that calls through to underlying Endura systems, wrap a COM control, and so on. This is a step toward providing developers with a set of tools for easily building video applications.
The SDK supports C# and C++ on Windows. Code samples are included in the SDK archive and on the PDN site. These samples illustrate the techniques necessary to fully utilize the capabilities of the SDK components.
Pelco SDK 3.0 introduces an Object Model that reduces reliance on the pre-built components in the SDK and makes working with the SDK easier than it was previously. For example, an object may make “smart” choices behind-the-scenes to ease the video stream setup burden on the developer. Rather than forcing the developer to specify many parameters and setup everything manually (in code) the stream gets initialized with a set of defaults based on internal parameters. The developer can change the stream as needed, but the common case is handled in an intelligent manner.
Subsequent SDK releases expand the functionality of the Object Model. For example, SDK 3.2 includes classes to display video on a network monitor. SDK 3.4 adds classes for managing the device cache. Refer to the SDK release notes and the SDK Programming Guide for more information.
Developers moving from SDK 2.x to 3.x should read the Pelco SDK Migration Guide for information on replacing components with classes from the Object Model.