Skip to content

Commit

Permalink
Issue \#58, Class names match Onvif Spec, buildXML() method for PTZ
Browse files Browse the repository at this point in the history
  • Loading branch information
faithoflifedev committed Feb 18, 2024
1 parent bc743e4 commit 4d1fa72
Show file tree
Hide file tree
Showing 53 changed files with 815 additions and 584 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.3.0

* Issue #58
* Reverted the timestamp format to build in dart `toIso8601String()`
* PTZ
* Revised class names for PTZ functionality to better match the Onvif Spec - PanTilt => Vector2D, Zoom => Vector1D
* Implemented the buildXML() method for much of the PTZ functionality to better place functionality in its useful class
* Capabilities
* All fields are now optional, not all devices are reporting this information
* DeviceManagement
* GetDeviceInformationResponse
* manufacturer and model are now optional fields, not all devices are reporting this information

## 2.2.0+2

* ptz absolute-move cli command params better match the Onvif spec
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To use this package in your code, first add the dependency to your project:
```yml
dependencies:
...
easy_onvif: ^2.2.0+2
easy_onvif: ^2.3.0
```
If you need additional help getting started with dart, check out these [guides](https://dart.dev/guides).
Expand Down Expand Up @@ -470,7 +470,11 @@ dependency_overrides:
## Breaking changes
### v2.1.x
### v2.3.0
For this release a number of `Common` classes where given name changes to better reflect the Onvif spec. Since these classes are used fairly deep in the API it's unlikely that if will affect many users. In addition in the current release these changes are limits to the `PTZ` module, so if the changes cause issue, it would only be in this section of the code.

### v2.1.0

There is probably a number of breaking changes in this version since some method signatures have changed. Since a large portion of the code base was rebuilt from scratch tracking all the changes wasn't a priority. Sorry for any inconvenience.

Expand Down
4 changes: 2 additions & 2 deletions example/flutter_model/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ class _MyHomePageState extends State<MyHomePage> with UiLoggy {

void _update() async {
setState(() {
model = deviceInfo.model;
model = deviceInfo.model ?? '';

manufacturer = deviceInfo.manufacturer;
manufacturer = deviceInfo.manufacturer ?? '';

firmwareVersion = deviceInfo.firmwareVersion;

Expand Down
29 changes: 29 additions & 0 deletions example/flutter_model/lib/service.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:xmime="http://tempuri.org/xmime.xsd"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsbf2="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:wsr2="http://docs.oasis-open.org/wsrf/r-2"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:tetsm="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding"
xmlns:tr2="http://www.onvif.org/ver20/media/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
xmlns:ter="http://www.onvif.org/ver10/error">
<SOAP-ENV:Body>
<tr2:GetServiceCapabilitiesResponse>
<tr2:Capabilities SnapshotUri="true" Rotation="false" VideoSourceMode="true" OSD="true" TemporaryOSDText="false" Mask="false" SourceMask="false">
<tr2:ProfileCapabilities MaximumNumberOfProfiles="64" ConfigurationsSupported="VideoSource AudioSource VideoEncoder AudioEncoder AudioOutput AudioDecoder PTZ Analytics"></tr2:ProfileCapabilities>
<tr2:StreamingCapabilities RTSPStreaming="true" RTPMulticast="true" RTP_RTSP_TCP="true" NonAggregateControl="true" AutoStartMulticast="true"></tr2:StreamingCapabilities>
</tr2:Capabilities>
</tr2:GetServiceCapabilitiesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
12 changes: 12 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: examples
version: 0.0.1
homepage: https://github.com/faithoflifedev/easy_onvif
description: An example
repository: https://github.com/faithoflifedev/easy_onvif
environment:
sdk: ">=3.2.0 <4.0.0"

dependencies:
easy_onvif: ^2.2.0+2
http: ^1.2.0
dio: ^5.4.0
2 changes: 1 addition & 1 deletion lib/meta.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ library meta;
import 'dart:convert' show json;

final pubSpec = json.decode(
'{"name":"easy_onvif","version":"2.2.0+2","homepage":"https://github.com/faithoflifedev/easy_onvif","environment":{"sdk":">=3.2.0 <4.0.0"},"description":"A pure Dart library designed primarily for command line automation of Onvif compatible devices, but can be used anywhere Dart is used.","dependencies":{"archive":"^3.4.10","args":"^2.4.2","cli_spin":"^1.0.1","convert":"^3.1.1","crypto":"^3.0.3","dio":"^5.4.0","ffi":"^2.1.0","html_unescape":"^2.0.0","intl":"^0.19.0","json_annotation":"^4.8.1","loggy":"^2.0.3","path":"^1.8.3","shelf":"^1.4.1","shelf_router":"^1.1.4","sprintf":"^7.0.0","universal_io":"^2.2.2","uuid":"^4.3.3","xml":"^6.5.0","xml2json":"^6.2.2","yaml":"^3.1.2"},"dev_dependencies":{"build_runner":"^2.4.8","grinder":"^0.9.5","json_serializable":"^6.7.1","lints":"^3.0.0","mustache_template":"^2.0.0","process_run":"^0.14.1+3","pub_semver":"^2.1.4","publish_tools":"^0.1.0+15","pubspec":"^2.3.0","test":"^1.25.1"},"executables":{"onvif":""},"repository":"https://github.com/faithoflifedev/easy_onvif"}');
'{"name":"easy_onvif","version":"2.3.0","homepage":"https://github.com/faithoflifedev/easy_onvif","environment":{"sdk":">=3.2.0 <4.0.0"},"description":"A pure Dart library designed primarily for command line automation of Onvif compatible devices, but can be used anywhere Dart is used.","dependencies":{"archive":"^3.4.10","args":"^2.4.2","cli_spin":"^1.0.1","convert":"^3.1.1","crypto":"^3.0.3","dio":"^5.4.0","ffi":"^2.1.0","html_unescape":"^2.0.0","http":"^1.2.0","intl":"^0.19.0","json_annotation":"^4.8.1","loggy":"^2.0.3","path":"^1.8.3","shelf":"^1.4.1","shelf_router":"^1.1.4","sprintf":"^7.0.0","universal_io":"^2.2.2","uuid":"^4.3.3","xml":"^6.5.0","xml2json":"^6.2.2","yaml":"^3.1.2"},"dev_dependencies":{"build_runner":"^2.4.8","grinder":"^0.9.5","json_serializable":"^6.7.1","lints":"^3.0.0","mustache_template":"^2.0.0","process_run":"^0.14.1+3","pub_semver":"^2.1.4","publish_tools":"^0.1.0+15","pubspec":"^2.3.0","test":"^1.25.1"},"executables":{"onvif":""},"repository":"https://github.com/faithoflifedev/easy_onvif"}');
2 changes: 0 additions & 2 deletions lib/ptz.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ export 'src/model/ptz/preset.dart';
export 'src/model/ptz/preset_tour.dart';
export 'src/model/ptz/pt_control_direction.dart';
export 'src/model/ptz/ptz_configuration_options.dart';
export 'src/model/ptz/ptz_position.dart';
export 'src/model/ptz/ptz_preset_tour_spot.dart';
export 'src/model/ptz/ptz_preset_tour_starting_condition.dart';
export 'src/model/ptz/ptz_preset_tour_status.dart';
export 'src/model/ptz/ptz_spaces.dart';
export 'src/model/ptz/ptz_status.dart';
export 'src/model/ptz/set_preset_response.dart';
13 changes: 8 additions & 5 deletions lib/shared.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export 'src/model/common/audio_source_configuration.dart';
export 'src/model/common/backlight_compensation.dart';
export 'src/model/common/event.dart';
export 'src/model/common/exposure.dart';
export 'src/model/common/float_range.dart';
export 'src/model/common/focus.dart';
export 'src/model/common/get_metadata_configuration_options_response.dart';
export 'src/model/common/get_metadata_configurations_response.dart';
Expand All @@ -22,21 +23,23 @@ export 'src/model/common/mixed_profile.dart';
export 'src/model/common/mpeg4.dart';
export 'src/model/common/multicast_configuration.dart';
export 'src/model/common/pan_tilt_limits.dart';
export 'src/model/common/pan_tilt.dart';
export 'src/model/common/ptz_configuration.dart';
export 'src/model/common/ptz_filter.dart';
export 'src/model/common/ptz_speed.dart';
export 'src/model/common/ptz_status.dart';
export 'src/model/common/ptz_status_filter_options.dart';
export 'src/model/common/ptz_vector.dart';
export 'src/model/common/reference_token.dart';
export 'src/model/common/rate_control.dart';
export 'src/model/common/resolution.dart';
export 'src/model/common/space.dart';
export 'src/model/common/space1d.dart';
export 'src/model/common/space2d.dart';
export 'src/model/common/space_1d.dart';
export 'src/model/common/space_2d.dart';
export 'src/model/common/vector_2d.dart';
export 'src/model/common/video_analytics_configuration.dart';
export 'src/model/common/video_encoder_configuration.dart';
export 'src/model/common/video_source_configuration.dart';
export 'src/model/common/white_balance.dart';
export 'src/model/common/wide_dynamic_range.dart';
export 'src/model/common/window.dart';
export 'src/model/common/zoom_limits.dart';
export 'src/model/common/zoom.dart';
export 'src/model/common/vector_1d.dart';
Loading

0 comments on commit 4d1fa72

Please sign in to comment.