Tutorial 2 – Getting Camera Information

Requirements:
Tutorial 1 – Connecting to the Base


If you recall from Getting Started it was explained that cameras are associated with Ocularis Recorders (recorders or NVRs for short), and recorders are associated with the Base. In this tutorial, we’ll show how to use the Ocularis SDK to retrieve information about cameras connected to the Ocularis system, and are associated to the Base.

From the previous tutorial, we left off with the ability to connect to a Base. Let’s expand on that by printing the list of cameras that a particular user has access to:

Now that we can retrieve the names of the cameras, let’s list out some privileges we have for this camera:

An explanation of these privileges are as follows:

CanAudio: If the device supports it, the user will have the ability to listen to audio from the device. Also, if the device supports it, the user will have the ability to speak to the device through its speakers.

CanStartRecording: This privilege allows the user to initiate manual recording while viewing a live video feed from the device. Video will be recorded to the location and for the duration as defined in the NVR for the camera.

CanPTZPresets: If the device supports it, the user will be able to direct it to configured preset positions.

CanPTZ: If the device supports it, the user will have the ability to operate pan, tilt & zoom functions.

HasPTZPatrol: If the device supports it, with presets configured to patrol, this privilege allows the user to pause the camera at any given preset.

CanExportFrames: The user will have the ability to export still images in .jpg format from the camera. This will only be applicable if the value for PlaybackLimit is not equal to 0.

CanExportVideo: The user will have the ability to export video in both .AVI and Database Format for the camera. This will only be applicable if the value for PlaybackLimit is not equal to 0.

CanExportBookmarks: The user will have the ability to export bookmarks for the camera. This will only be applicable if the value for PlaybackLimit is not equal to 0.

PlaybackLimit: The value entered here identifies if and for how long into the past the camera’s video may be viewed by this user.
Possible Values:
0 = No Browse Privilege
-1 = Unlimited Browse Privilege (any available video from past recordings may be viewed)
1 through 168 = The number of hours that the user may browse recorded video for the device.

GetLiveUrl: Gets the URL for viewing live video.

GetID: Gets the unique identifier for a device – a camera is a device.

As we work through these tutorials the above privileges will come into effect and may cause confusion if things aren’t working properly. Using the code above we can see what privileges the current user has for a particular camera.

Screenshot of the final program:
Series-7-Tutorial-2

Well that about sums it up. You can now retrieve the list of cameras on your system and print out useful information for each one.


Next:
Tutorial 3 – Adding Bookmarks