ONVIF Rust LIB
ONVIF is a industry protocol used widely by many IP cameras. If a camera is ONVIF compliant, you can discover it's IP address and query it for various capabilities and specifications.
This Rust lib provides, at the moment, a very barebones implementation of some of the protocol. More is planned.
This is a very bare bones implementation of the ONVIF protocol. The following messages are implemented:
- Discovery
- Capabilities
- DeviceInfo
- Profiles
- GetStreamURI
- and a couple more now... (see below for complete list)
Implementation of those messages are bare basics and don't store or parse the entire SOAP response in many cases. This whole lib is really in support of an RTSP/RTP/H264 streaming client I wrote at https://github.com/gsuyemoto/rtsp-rtp-rs, which will become a Rust crate soon.
The example discovers an IP camera (only tested on a single Topodome) and then uses OpenCV to stream via RTP and detect faces via Haar cascades.
In order to run the example, you will need Clang and OpenCV. On Debian Linux:
Getting Started
When creating a new Client object, the Client will first look to see if there is a file in the base directory to provide information about cameras and IP addresses. If the file is not present, then the Client will broadcast a predefined message on the network and compliant cameras should reply with their IP address. With the IP address in hand, you can then continue to query the devices for more information.
use Result;
use CameraBuilder;
use ;
use Camera;
async
A super simple Camera device object creation can go like this:
use Result;
use CameraBuilder;
use Camera;
async
Which might work out better when testing as some cameras and devices might time out with too many discovery messages.
Messages Implemented:
- Discovery
- Capabilities
- DeviceInfo
- Profiles
- GetStreamURI
- GetServices
Messages Started (Basic Response and no Parsing of Reply):
- GetServiceCapabilities
- GetDNS
- GetDot11Status
- GetGeoLocation
- CreatePullPointSubscriptionRequest