Setting up Ocularis Mobile for Location Reporting

Ocularis 5 Mobile for android is almost ready for general release, and one of the things we’ve added is the ability to let the app report the location of the device when the user is streaming video from the device to the recorder. To enable this, you’ll need to add a line to the settings.ini file (we’ll make a nice GUI later 🙂 )

The location reporting will open a user-defined URL, and append the location of the device to the URL given. For example, given http://host/loc.aspx? the device will periodically request the given with a querystring appended containing the values needed. like so

The session value is unique to each session, meaning that if a user starts a stream, then stops it, that counts as one session. All location updates within that session will have the same session ID. If the user starts a new recording, a new GUID will be generated and used until that recording then ends.

The id is the device ID, in the current version it is the IMEI of the device, and naturally gps_lat and gps_long is the position of the device.

To enable this feature, you have to add the host information to the settings.ini file, so if the service is at the URL in the example above, you would create this line

Upon request, we can provide some examples of a location service that ties into the Windows version of the Ocularis Client that will show the location of the device on a map, and as an overlay text on the video stream.

 

Creating an OCAdapter the Easy Way

If you’re writing an app that uses the Ocularis SDK, you should instantiate the OCAdapter object this way:

That way, all you’ll need is a reference to the OcularisInterface.dll and you won’t have to carry around a lot of drivers and DLL’s that are already in the SDK folder.

Welcome to the New OnSSI SDK Page

We’re changing the format of the SDK support page a bit. Instead of the older Wiki format, that was more of a reference, we are going to offer a tutorial based approach. The old Wiki is still alive at http://sdkwiki.onssi.com. We will update this page quite frequently over the next 12 months (2016), so be sure to check back often. You’ll find pages that are not complete, and pages may disappear from time to time, but that just adds to the excitement.

The most common integration is getting video into your own application. A very common approach is to offer a COM object that you can instantiate in your Windows based app. The object then handles mouse movements, decoding of the video, and displaying it on the screen. This method works fine in many cases, but there are areas where it doesn’t. If you want direct access to the video (the RAW coded video for example), you may be out of luck, and what if you want to do something on OSX, or in a web page?

To provide support for a wide range of scenarios, Ocularis offers a few ways for you to interact with us.

Another typical scenario is that you want to notify Ocularis of events that happen in your system, so that Ocularis may react to those events – perhaps by moving a camera to a PTZ preset.