onvif-python 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- onvif/__init__.py +13 -0
- onvif/client.py +485 -0
- onvif/operator.py +130 -0
- onvif/services/__init__.py +75 -0
- onvif/services/accesscontrol.py +105 -0
- onvif/services/accessrules.py +47 -0
- onvif/services/actionengine.py +46 -0
- onvif/services/analytics/analytics.py +60 -0
- onvif/services/analytics/ruleengine.py +44 -0
- onvif/services/analyticsdevice.py +122 -0
- onvif/services/appmgmt.py +40 -0
- onvif/services/authenticationbehavior.py +83 -0
- onvif/services/credential.py +159 -0
- onvif/services/deviceio.py +165 -0
- onvif/services/devicemgmt.py +410 -0
- onvif/services/display.py +62 -0
- onvif/services/doorcontrol.py +93 -0
- onvif/services/events/events.py +41 -0
- onvif/services/events/notification.py +34 -0
- onvif/services/events/pullpoint.py +29 -0
- onvif/services/events/subscription.py +21 -0
- onvif/services/imaging.py +62 -0
- onvif/services/media.py +424 -0
- onvif/services/media2.py +310 -0
- onvif/services/provisioning.py +50 -0
- onvif/services/ptz.py +187 -0
- onvif/services/receiver.py +46 -0
- onvif/services/recording.py +136 -0
- onvif/services/replay.py +30 -0
- onvif/services/schedule.py +82 -0
- onvif/services/search.py +149 -0
- onvif/services/security/advancedsecurity.py +19 -0
- onvif/services/security/authorizationserver.py +31 -0
- onvif/services/security/dot1x.py +42 -0
- onvif/services/security/jwt.py +21 -0
- onvif/services/security/keystore.py +208 -0
- onvif/services/security/mediasigning.py +30 -0
- onvif/services/security/tlsserver.py +82 -0
- onvif/services/thermal.py +54 -0
- onvif/services/uplink.py +28 -0
- onvif/utils/__init__.py +4 -0
- onvif/utils/exceptions.py +33 -0
- onvif/utils/wsdl.py +297 -0
- onvif/wsdl/ver10/accesscontrol/wsdl/index.html +7 -0
- onvif/wsdl/ver10/accessrules/wsdl/accessrules.wsdl +702 -0
- onvif/wsdl/ver10/accessrules/wsdl/index.html +7 -0
- onvif/wsdl/ver10/actionengine.wsdl +1265 -0
- onvif/wsdl/ver10/advancedsecurity/wsdl/advancedsecurity.wsdl +4159 -0
- onvif/wsdl/ver10/advancedsecurity/wsdl/index.html +7 -0
- onvif/wsdl/ver10/analyticsdevice.wsdl +709 -0
- onvif/wsdl/ver10/appmgmt/wsdl/appmgmt.wsdl +502 -0
- onvif/wsdl/ver10/appmgmt/wsdl/index.html +7 -0
- onvif/wsdl/ver10/authenticationbehavior/wsdl/authenticationbehavior.wsdl +1382 -0
- onvif/wsdl/ver10/authenticationbehavior/wsdl/index.html +7 -0
- onvif/wsdl/ver10/credential/wsdl/credential.wsdl +2018 -0
- onvif/wsdl/ver10/credential/wsdl/index.html +7 -0
- onvif/wsdl/ver10/device/wsdl/devicemgmt.wsdl +4623 -0
- onvif/wsdl/ver10/deviceio.wsdl +1414 -0
- onvif/wsdl/ver10/display/display.wsdl +383 -0
- onvif/wsdl/ver10/display/wsdl/index.htm +383 -0
- onvif/wsdl/ver10/display.wsdl +521 -0
- onvif/wsdl/ver10/doorcontrol/wsdl/index.html +7 -0
- onvif/wsdl/ver10/events/wsdl/bw-2-vs-mod.wsdl +449 -0
- onvif/wsdl/ver10/events/wsdl/event-vs.wsdl +947 -0
- onvif/wsdl/ver10/events/wsdl/event.wsdl +947 -0
- onvif/wsdl/ver10/events/wsdl/index.html +7 -0
- onvif/wsdl/ver10/federatedsearch.wsdl +344 -0
- onvif/wsdl/ver10/media/wsdl/media.wsdl +3684 -0
- onvif/wsdl/ver10/pacs/accesscontrol.wsdl +1942 -0
- onvif/wsdl/ver10/pacs/doorcontrol.wsdl +1792 -0
- onvif/wsdl/ver10/pacs/types.xsd +181 -0
- onvif/wsdl/ver10/provisioning/wsdl/provisioning.wsdl +588 -0
- onvif/wsdl/ver10/receiver.wsdl +398 -0
- onvif/wsdl/ver10/recording.wsdl +1231 -0
- onvif/wsdl/ver10/replay.wsdl +221 -0
- onvif/wsdl/ver10/schedule/wsdl/index.html +7 -0
- onvif/wsdl/ver10/schedule/wsdl/schedule.wsdl +1383 -0
- onvif/wsdl/ver10/schema/common.xsd +422 -0
- onvif/wsdl/ver10/schema/metadatastream.xsd +520 -0
- onvif/wsdl/ver10/schema/onvif.xsd +9251 -0
- onvif/wsdl/ver10/search.wsdl +882 -0
- onvif/wsdl/ver10/thermal/wsdl/index.html +7 -0
- onvif/wsdl/ver10/thermal/wsdl/thermal.wsdl +777 -0
- onvif/wsdl/ver10/topics/topicns.xml +13 -0
- onvif/wsdl/ver10/uplink/wsdl/index.html +7 -0
- onvif/wsdl/ver10/uplink/wsdl/uplink.wsdl +256 -0
- onvif/wsdl/ver20/analytics/humanbody.xsd +490 -0
- onvif/wsdl/ver20/analytics/humanface.xsd +501 -0
- onvif/wsdl/ver20/analytics/index.html +7 -0
- onvif/wsdl/ver20/analytics/radiometry.xsd +389 -0
- onvif/wsdl/ver20/analytics/rules.xsd +127 -0
- onvif/wsdl/ver20/analytics/wsdl/analytics.wsdl +757 -0
- onvif/wsdl/ver20/analytics/wsdl/index.html +7 -0
- onvif/wsdl/ver20/imaging/wsdl/imaging.wsdl +603 -0
- onvif/wsdl/ver20/media/wsdl/index.html +7 -0
- onvif/wsdl/ver20/media/wsdl/media.wsdl +2862 -0
- onvif/wsdl/ver20/ptz/wsdl/ptz.wsdl +1450 -0
- onvif/wsdl/ver20/util/federated_search_documentation.html +1647 -0
- onvif/wsdl/ver20/util/fedsearch-docu-viewer.xsl +8 -0
- onvif/wsdl/ver20/util/onvif-wsdl-viewer.xsl +2580 -0
- onvif/wsdl/ver20/util/operationIndex.html +97 -0
- onvif_python-0.0.1.dist-info/METADATA +381 -0
- onvif_python-0.0.1.dist-info/RECORD +106 -0
- onvif_python-0.0.1.dist-info/WHEEL +5 -0
- onvif_python-0.0.1.dist-info/licenses/LICENSE.md +21 -0
- onvif_python-0.0.1.dist-info/top_level.txt +1 -0
onvif/services/media2.py
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# onvif/services/media2.py
|
|
2
|
+
|
|
3
|
+
from ..operator import ONVIFOperator
|
|
4
|
+
from ..utils import ONVIFWSDL
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Media2:
|
|
8
|
+
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
definition = ONVIFWSDL.get_definition("media2", "ver20")
|
|
10
|
+
self.operator = ONVIFOperator(
|
|
11
|
+
definition["path"],
|
|
12
|
+
binding=f"{{{definition['namespace']}}}{definition['binding']}",
|
|
13
|
+
service_path="Media2", # fallback
|
|
14
|
+
xaddr=xaddr,
|
|
15
|
+
**kwargs,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
def GetServiceCapabilities(self):
|
|
19
|
+
return self.operator.call("GetServiceCapabilities")
|
|
20
|
+
|
|
21
|
+
def CreateProfile(self, Name, Configuration=None):
|
|
22
|
+
return self.operator.call(
|
|
23
|
+
"CreateProfile", Name=Name, Configuration=Configuration
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
def GetProfiles(self, Token=None, Type=None):
|
|
27
|
+
return self.operator.call("GetProfiles", Token=Token, Type=Type)
|
|
28
|
+
|
|
29
|
+
def AddConfiguration(self, ProfileToken, Name=None, Configuration=None):
|
|
30
|
+
return self.operator.call(
|
|
31
|
+
"AddConfiguration",
|
|
32
|
+
ProfileToken=ProfileToken,
|
|
33
|
+
Name=Name,
|
|
34
|
+
Configuration=Configuration,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
def RemoveConfiguration(self, ProfileToken, Configuration):
|
|
38
|
+
return self.operator.call(
|
|
39
|
+
"RemoveConfiguration",
|
|
40
|
+
ProfileToken=ProfileToken,
|
|
41
|
+
Configuration=Configuration,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
def DeleteProfile(self, Token):
|
|
45
|
+
return self.operator.call("DeleteProfile", Token=Token)
|
|
46
|
+
|
|
47
|
+
def GetVideoSourceConfigurations(self, ConfigurationToken=None, ProfileToken=None):
|
|
48
|
+
return self.operator.call(
|
|
49
|
+
"GetVideoSourceConfigurations",
|
|
50
|
+
ConfigurationToken=ConfigurationToken,
|
|
51
|
+
ProfileToken=ProfileToken,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
def GetVideoEncoderConfigurations(self, ConfigurationToken=None, ProfileToken=None):
|
|
55
|
+
return self.operator.call(
|
|
56
|
+
"GetVideoEncoderConfigurations",
|
|
57
|
+
ConfigurationToken=ConfigurationToken,
|
|
58
|
+
ProfileToken=ProfileToken,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
def GetAudioSourceConfigurations(self, ConfigurationToken=None, ProfileToken=None):
|
|
62
|
+
return self.operator.call(
|
|
63
|
+
"GetAudioSourceConfigurations",
|
|
64
|
+
ConfigurationToken=ConfigurationToken,
|
|
65
|
+
ProfileToken=ProfileToken,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
def GetAudioEncoderConfigurations(self, ConfigurationToken=None, ProfileToken=None):
|
|
69
|
+
return self.operator.call(
|
|
70
|
+
"GetAudioEncoderConfigurations",
|
|
71
|
+
ConfigurationToken=ConfigurationToken,
|
|
72
|
+
ProfileToken=ProfileToken,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
def GetAnalyticsConfigurations(self, ConfigurationToken=None, ProfileToken=None):
|
|
76
|
+
return self.operator.call(
|
|
77
|
+
"GetAnalyticsConfigurations",
|
|
78
|
+
ConfigurationToken=ConfigurationToken,
|
|
79
|
+
ProfileToken=ProfileToken,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
def GetMetadataConfigurations(self, ConfigurationToken=None, ProfileToken=None):
|
|
83
|
+
return self.operator.call(
|
|
84
|
+
"GetMetadataConfigurations",
|
|
85
|
+
ConfigurationToken=ConfigurationToken,
|
|
86
|
+
ProfileToken=ProfileToken,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
def GetAudioOutputConfigurations(self, ConfigurationToken=None, ProfileToken=None):
|
|
90
|
+
return self.operator.call(
|
|
91
|
+
"GetAudioOutputConfigurations",
|
|
92
|
+
ConfigurationToken=ConfigurationToken,
|
|
93
|
+
ProfileToken=ProfileToken,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
def GetAudioDecoderConfigurations(self, ConfigurationToken=None, ProfileToken=None):
|
|
97
|
+
return self.operator.call(
|
|
98
|
+
"GetAudioDecoderConfigurations",
|
|
99
|
+
ConfigurationToken=ConfigurationToken,
|
|
100
|
+
ProfileToken=ProfileToken,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
def SetVideoSourceConfiguration(self, Configuration):
|
|
104
|
+
return self.operator.call(
|
|
105
|
+
"SetVideoSourceConfiguration", Configuration=Configuration
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
def SetVideoEncoderConfiguration(self, Configuration):
|
|
109
|
+
return self.operator.call(
|
|
110
|
+
"SetVideoEncoderConfiguration", Configuration=Configuration
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
def SetAudioSourceConfiguration(self, Configuration):
|
|
114
|
+
return self.operator.call(
|
|
115
|
+
"SetAudioSourceConfiguration", Configuration=Configuration
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
def SetAudioEncoderConfiguration(self, Configuration):
|
|
119
|
+
return self.operator.call(
|
|
120
|
+
"SetAudioEncoderConfiguration", Configuration=Configuration
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
def SetMetadataConfiguration(self, Configuration):
|
|
124
|
+
return self.operator.call(
|
|
125
|
+
"SetMetadataConfiguration", Configuration=Configuration
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
def SetAudioOutputConfiguration(self, Configuration):
|
|
129
|
+
return self.operator.call(
|
|
130
|
+
"SetAudioOutputConfiguration", Configuration=Configuration
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
def SetAudioDecoderConfiguration(self, Configuration):
|
|
134
|
+
return self.operator.call(
|
|
135
|
+
"SetAudioDecoderConfiguration", Configuration=Configuration
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
def SetEQPreset(self, Configuration):
|
|
139
|
+
return self.operator.call("SetEQPreset", Configuration=Configuration)
|
|
140
|
+
|
|
141
|
+
def GetVideoSourceConfigurationOptions(
|
|
142
|
+
self, ConfigurationToken=None, ProfileToken=None
|
|
143
|
+
):
|
|
144
|
+
return self.operator.call(
|
|
145
|
+
"GetVideoSourceConfigurationOptions",
|
|
146
|
+
ConfigurationToken=ConfigurationToken,
|
|
147
|
+
ProfileToken=ProfileToken,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
def GetVideoEncoderConfigurationOptions(
|
|
151
|
+
self, ConfigurationToken=None, ProfileToken=None
|
|
152
|
+
):
|
|
153
|
+
return self.operator.call(
|
|
154
|
+
"GetVideoEncoderConfigurationOptions",
|
|
155
|
+
ConfigurationToken=ConfigurationToken,
|
|
156
|
+
ProfileToken=ProfileToken,
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
def GetAudioSourceConfigurationOptions(
|
|
160
|
+
self, ConfigurationToken=None, ProfileToken=None
|
|
161
|
+
):
|
|
162
|
+
return self.operator.call(
|
|
163
|
+
"GetAudioSourceConfigurationOptions",
|
|
164
|
+
ConfigurationToken=ConfigurationToken,
|
|
165
|
+
ProfileToken=ProfileToken,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
def GetAudioEncoderConfigurationOptions(
|
|
169
|
+
self, ConfigurationToken=None, ProfileToken=None
|
|
170
|
+
):
|
|
171
|
+
return self.operator.call(
|
|
172
|
+
"GetAudioEncoderConfigurationOptions",
|
|
173
|
+
ConfigurationToken=ConfigurationToken,
|
|
174
|
+
ProfileToken=ProfileToken,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
def GetMetadataConfigurationOptions(
|
|
178
|
+
self, ConfigurationToken=None, ProfileToken=None
|
|
179
|
+
):
|
|
180
|
+
return self.operator.call(
|
|
181
|
+
"GetMetadataConfigurationOptions",
|
|
182
|
+
ConfigurationToken=ConfigurationToken,
|
|
183
|
+
ProfileToken=ProfileToken,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
def GetAudioOutputConfigurationOptions(
|
|
187
|
+
self, ConfigurationToken=None, ProfileToken=None
|
|
188
|
+
):
|
|
189
|
+
return self.operator.call(
|
|
190
|
+
"GetAudioOutputConfigurationOptions",
|
|
191
|
+
ConfigurationToken=ConfigurationToken,
|
|
192
|
+
ProfileToken=ProfileToken,
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
def GetAudioDecoderConfigurationOptions(
|
|
196
|
+
self, ConfigurationToken=None, ProfileToken=None
|
|
197
|
+
):
|
|
198
|
+
return self.operator.call(
|
|
199
|
+
"GetAudioDecoderConfigurationOptions",
|
|
200
|
+
ConfigurationToken=ConfigurationToken,
|
|
201
|
+
ProfileToken=ProfileToken,
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
def GetVideoEncoderInstances(self, ConfigurationToken):
|
|
205
|
+
return self.operator.call(
|
|
206
|
+
"GetVideoEncoderInstances", ConfigurationToken=ConfigurationToken
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
def GetStreamUri(self, Protocol, ProfileToken):
|
|
210
|
+
return self.operator.call(
|
|
211
|
+
"GetStreamUri", Protocol=Protocol, ProfileToken=ProfileToken
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
def StartMulticastStreaming(self, ProfileToken):
|
|
215
|
+
return self.operator.call("StartMulticastStreaming", ProfileToken=ProfileToken)
|
|
216
|
+
|
|
217
|
+
def StopMulticastStreaming(self, ProfileToken):
|
|
218
|
+
return self.operator.call("StopMulticastStreaming", ProfileToken=ProfileToken)
|
|
219
|
+
|
|
220
|
+
def SetSynchronizationPoint(self, ProfileToken):
|
|
221
|
+
return self.operator.call("SetSynchronizationPoint", ProfileToken=ProfileToken)
|
|
222
|
+
|
|
223
|
+
def GetSnapshotUri(self, ProfileToken):
|
|
224
|
+
return self.operator.call("GetSnapshotUri", ProfileToken=ProfileToken)
|
|
225
|
+
|
|
226
|
+
def GetVideoSourceModes(self, VideoSourceToken):
|
|
227
|
+
return self.operator.call(
|
|
228
|
+
"GetVideoSourceModes", VideoSourceToken=VideoSourceToken
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
def SetVideoSourceMode(self, VideoSourceToken, VideoSourceModeToken):
|
|
232
|
+
return self.operator.call(
|
|
233
|
+
"SetVideoSourceMode",
|
|
234
|
+
VideoSourceToken=VideoSourceToken,
|
|
235
|
+
VideoSourceModeToken=VideoSourceModeToken,
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
def GetOSDs(self, OSDToken=None, ConfigurationToken=None):
|
|
239
|
+
return self.operator.call(
|
|
240
|
+
"GetOSDs", OSDToken=OSDToken, ConfigurationToken=ConfigurationToken
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
def GetOSDOptions(self, ConfigurationToken):
|
|
244
|
+
return self.operator.call(
|
|
245
|
+
"GetOSDOptions", ConfigurationToken=ConfigurationToken
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
def SetOSD(self, OSD):
|
|
249
|
+
return self.operator.call("SetOSD", OSD=OSD)
|
|
250
|
+
|
|
251
|
+
def CreateOSD(self, OSD):
|
|
252
|
+
return self.operator.call("CreateOSD", OSD=OSD)
|
|
253
|
+
|
|
254
|
+
def DeleteOSD(self, OSDToken):
|
|
255
|
+
return self.operator.call("DeleteOSD", OSDToken=OSDToken)
|
|
256
|
+
|
|
257
|
+
def GetMasks(self, Token=None, ConfigurationToken=None):
|
|
258
|
+
return self.operator.call(
|
|
259
|
+
"GetMasks", Token=Token, ConfigurationToken=ConfigurationToken
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
def GetMaskOptions(self, ConfigurationToken):
|
|
263
|
+
return self.operator.call(
|
|
264
|
+
"GetMaskOptions", ConfigurationToken=ConfigurationToken
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
def SetMask(self, Mask):
|
|
268
|
+
return self.operator.call("SetMask", Mask=Mask)
|
|
269
|
+
|
|
270
|
+
def CreateMask(self, Mask):
|
|
271
|
+
return self.operator.call("CreateMask", Mask=Mask)
|
|
272
|
+
|
|
273
|
+
def DeleteMask(self, Token):
|
|
274
|
+
return self.operator.call("DeleteMask", Token=Token)
|
|
275
|
+
|
|
276
|
+
def GetWebRTCConfigurations(self):
|
|
277
|
+
return self.operator.call("GetWebRTCConfigurations")
|
|
278
|
+
|
|
279
|
+
def SetWebRTCConfigurations(self, WebRTCConfiguration=None):
|
|
280
|
+
return self.operator.call(
|
|
281
|
+
"SetWebRTCConfigurations", WebRTCConfiguration=WebRTCConfiguration
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
def GetAudioClips(self, Token=None):
|
|
285
|
+
return self.operator.call("GetAudioClips", Token=Token)
|
|
286
|
+
|
|
287
|
+
def AddAudioClip(self, Configuration, Token=None):
|
|
288
|
+
return self.operator.call(
|
|
289
|
+
"AddAudioClip", Token=Token, Configuration=Configuration
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
def SetAudioClip(self, Token, Configuration):
|
|
293
|
+
return self.operator.call(
|
|
294
|
+
"SetAudioClip", Token=Token, Configuration=Configuration
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
def DeleteAudioClip(self, Token):
|
|
298
|
+
return self.operator.call("DeleteAudioClip", Token=Token)
|
|
299
|
+
|
|
300
|
+
def PlayAudioClip(self, Token, Play, AudioOutputToken=None, RepeatCycles=None):
|
|
301
|
+
return self.operator.call(
|
|
302
|
+
"PlayAudioClip",
|
|
303
|
+
Token=Token,
|
|
304
|
+
AudioOutputToken=AudioOutputToken,
|
|
305
|
+
Play=Play,
|
|
306
|
+
RepeatCycles=RepeatCycles,
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
def GetPlayingAudioClips(self):
|
|
310
|
+
return self.operator.call("GetPlayingAudioClips")
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# onvif/services/provisioning.py
|
|
2
|
+
|
|
3
|
+
from ..operator import ONVIFOperator
|
|
4
|
+
from ..utils import ONVIFWSDL
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Provisioning:
|
|
8
|
+
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
definition = ONVIFWSDL.get_definition("provisioning")
|
|
10
|
+
self.operator = ONVIFOperator(
|
|
11
|
+
definition["path"],
|
|
12
|
+
binding=f"{{{definition['namespace']}}}{definition['binding']}",
|
|
13
|
+
service_path="Provisioning", # fallback
|
|
14
|
+
xaddr=xaddr,
|
|
15
|
+
**kwargs,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
def GetServiceCapabilities(self):
|
|
19
|
+
return self.operator.call("GetServiceCapabilities")
|
|
20
|
+
|
|
21
|
+
def PanMove(self, VideoSource, Direction, Timeout=None):
|
|
22
|
+
return self.operator.call(
|
|
23
|
+
"PanMove", VideoSource=VideoSource, Direction=Direction, Timeout=Timeout
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
def TiltMove(self, VideoSource, Direction, Timeout=None):
|
|
27
|
+
return self.operator.call(
|
|
28
|
+
"TiltMove", VideoSource=VideoSource, Direction=Direction, Timeout=Timeout
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
def ZoomMove(self, VideoSource, Direction, Timeout=None):
|
|
32
|
+
return self.operator.call(
|
|
33
|
+
"ZoomMove", VideoSource=VideoSource, Direction=Direction, Timeout=Timeout
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
def RollMove(self, VideoSource, Direction, Timeout=None):
|
|
37
|
+
return self.operator.call(
|
|
38
|
+
"RollMove", VideoSource=VideoSource, Direction=Direction, Timeout=Timeout
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def FocusMove(self, VideoSource, Direction, Timeout=None):
|
|
42
|
+
return self.operator.call(
|
|
43
|
+
"FocusMove", VideoSource=VideoSource, Direction=Direction, Timeout=Timeout
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
def Stop(self, VideoSource):
|
|
47
|
+
return self.operator.call("Stop", VideoSource=VideoSource)
|
|
48
|
+
|
|
49
|
+
def GetUsage(self, VideoSource):
|
|
50
|
+
return self.operator.call("GetUsage", VideoSource=VideoSource)
|
onvif/services/ptz.py
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# onvif/services/ptz.py
|
|
2
|
+
|
|
3
|
+
from ..operator import ONVIFOperator
|
|
4
|
+
from ..utils import ONVIFWSDL
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class PTZ:
|
|
8
|
+
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
definition = ONVIFWSDL.get_definition("ptz", "ver20")
|
|
10
|
+
self.operator = ONVIFOperator(
|
|
11
|
+
definition["path"],
|
|
12
|
+
binding=f"{{{definition['namespace']}}}{definition['binding']}",
|
|
13
|
+
service_path="PTZ", # fallback
|
|
14
|
+
xaddr=xaddr,
|
|
15
|
+
**kwargs,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
def GetServiceCapabilities(self):
|
|
19
|
+
return self.operator.call("GetServiceCapabilities")
|
|
20
|
+
|
|
21
|
+
def GetConfigurations(self):
|
|
22
|
+
return self.operator.call("GetConfigurations")
|
|
23
|
+
|
|
24
|
+
def GetPresets(self, ProfileToken):
|
|
25
|
+
return self.operator.call("GetPresets", ProfileToken=ProfileToken)
|
|
26
|
+
|
|
27
|
+
def SetPreset(self, ProfileToken, PresetName=None, PresetToken=None):
|
|
28
|
+
return self.operator.call(
|
|
29
|
+
"SetPreset",
|
|
30
|
+
ProfileToken=ProfileToken,
|
|
31
|
+
PresetName=PresetName,
|
|
32
|
+
PresetToken=PresetToken,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
def RemovePreset(self, ProfileToken, PresetToken):
|
|
36
|
+
return self.operator.call(
|
|
37
|
+
"RemovePreset", ProfileToken=ProfileToken, PresetToken=PresetToken
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
def GotoPreset(self, ProfileToken, PresetToken, Speed=None):
|
|
41
|
+
return self.operator.call(
|
|
42
|
+
"GotoPreset",
|
|
43
|
+
ProfileToken=ProfileToken,
|
|
44
|
+
PresetToken=PresetToken,
|
|
45
|
+
Speed=Speed,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
def GetStatus(self, ProfileToken):
|
|
49
|
+
return self.operator.call("GetStatus", ProfileToken=ProfileToken)
|
|
50
|
+
|
|
51
|
+
def GetConfiguration(self, PTZConfigurationToken):
|
|
52
|
+
return self.operator.call(
|
|
53
|
+
"GetConfiguration", PTZConfigurationToken=PTZConfigurationToken
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
def GetNodes(self):
|
|
57
|
+
return self.operator.call("GetNodes")
|
|
58
|
+
|
|
59
|
+
def GetNode(self, NodeToken):
|
|
60
|
+
return self.operator.call("GetNode", NodeToken=NodeToken)
|
|
61
|
+
|
|
62
|
+
def SetConfiguration(self, PTZConfiguration, ForcePersistence):
|
|
63
|
+
return self.operator.call(
|
|
64
|
+
"SetConfiguration",
|
|
65
|
+
PTZConfiguration=PTZConfiguration,
|
|
66
|
+
ForcePersistence=ForcePersistence,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
def GetConfigurationOptions(self, ConfigurationToken):
|
|
70
|
+
return self.operator.call(
|
|
71
|
+
"GetConfigurationOptions", ConfigurationToken=ConfigurationToken
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
def GotoHomePosition(self, ProfileToken, Speed=None):
|
|
75
|
+
return self.operator.call(
|
|
76
|
+
"GotoHomePosition", ProfileToken=ProfileToken, Speed=Speed
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
def SetHomePosition(self, ProfileToken):
|
|
80
|
+
return self.operator.call("SetHomePosition", ProfileToken=ProfileToken)
|
|
81
|
+
|
|
82
|
+
def ContinuousMove(self, ProfileToken, Velocity, Timeout=None):
|
|
83
|
+
return self.operator.call(
|
|
84
|
+
"ContinuousMove",
|
|
85
|
+
ProfileToken=ProfileToken,
|
|
86
|
+
Velocity=Velocity,
|
|
87
|
+
Timeout=Timeout,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
def RelativeMove(self, ProfileToken, Translation, Speed=None):
|
|
91
|
+
return self.operator.call(
|
|
92
|
+
"RelativeMove",
|
|
93
|
+
ProfileToken=ProfileToken,
|
|
94
|
+
Translation=Translation,
|
|
95
|
+
Speed=Speed,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
def SendAuxiliaryCommand(self, ProfileToken, AuxiliaryData):
|
|
99
|
+
return self.operator.call(
|
|
100
|
+
"SendAuxiliaryCommand",
|
|
101
|
+
ProfileToken=ProfileToken,
|
|
102
|
+
AuxiliaryData=AuxiliaryData,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
def AbsoluteMove(self, ProfileToken, Position, Speed=None):
|
|
106
|
+
return self.operator.call(
|
|
107
|
+
"AbsoluteMove", ProfileToken=ProfileToken, Position=Position, Speed=Speed
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
def GeoMove(
|
|
111
|
+
self, ProfileToken, Target, Speed=None, AreaHeight=None, AreaWidth=None
|
|
112
|
+
):
|
|
113
|
+
return self.operator.call(
|
|
114
|
+
"GeoMove",
|
|
115
|
+
ProfileToken=ProfileToken,
|
|
116
|
+
Target=Target,
|
|
117
|
+
Speed=Speed,
|
|
118
|
+
AreaHeight=AreaHeight,
|
|
119
|
+
AreaWidth=AreaWidth,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
def Stop(self, ProfileToken, PanTilt=None, Zoom=None):
|
|
123
|
+
return self.operator.call(
|
|
124
|
+
"Stop", ProfileToken=ProfileToken, PanTilt=PanTilt, Zoom=Zoom
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
def GetPresetTours(self, ProfileToken):
|
|
128
|
+
return self.operator.call("GetPresetTours", ProfileToken=ProfileToken)
|
|
129
|
+
|
|
130
|
+
def GetPresetTour(self, ProfileToken, PresetTourToken):
|
|
131
|
+
return self.operator.call(
|
|
132
|
+
"GetPresetTour", ProfileToken=ProfileToken, PresetTourToken=PresetTourToken
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
def GetPresetTourOptions(self, ProfileToken, PresetTourToken=None):
|
|
136
|
+
return self.operator.call(
|
|
137
|
+
"GetPresetTourOptions",
|
|
138
|
+
ProfileToken=ProfileToken,
|
|
139
|
+
PresetTourToken=PresetTourToken,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
def CreatePresetTour(self, ProfileToken):
|
|
143
|
+
return self.operator.call("CreatePresetTour", ProfileToken=ProfileToken)
|
|
144
|
+
|
|
145
|
+
def ModifyPresetTour(self, ProfileToken, PresetTour):
|
|
146
|
+
return self.operator.call(
|
|
147
|
+
"ModifyPresetTour", ProfileToken=ProfileToken, PresetTour=PresetTour
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
def OperatePresetTour(self, ProfileToken, PresetTourToken, Operation):
|
|
151
|
+
return self.operator.call(
|
|
152
|
+
"OperatePresetTour",
|
|
153
|
+
ProfileToken=ProfileToken,
|
|
154
|
+
PresetTourToken=PresetTourToken,
|
|
155
|
+
Operation=Operation,
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
def RemovePresetTour(self, ProfileToken, PresetTourToken):
|
|
159
|
+
return self.operator.call(
|
|
160
|
+
"RemovePresetTour",
|
|
161
|
+
ProfileToken=ProfileToken,
|
|
162
|
+
PresetTourToken=PresetTourToken,
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
def GetCompatibleConfigurations(self, ProfileToken):
|
|
166
|
+
return self.operator.call(
|
|
167
|
+
"GetCompatibleConfigurations", ProfileToken=ProfileToken
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
def MoveAndStartTracking(
|
|
171
|
+
self,
|
|
172
|
+
ProfileToken,
|
|
173
|
+
ObjectID,
|
|
174
|
+
PresetToken=None,
|
|
175
|
+
GeoLocation=None,
|
|
176
|
+
TargetPosition=None,
|
|
177
|
+
Speed=None,
|
|
178
|
+
):
|
|
179
|
+
return self.operator.call(
|
|
180
|
+
"MoveAndStartTracking",
|
|
181
|
+
ProfileToken=ProfileToken,
|
|
182
|
+
PresetToken=PresetToken,
|
|
183
|
+
GeoLocation=GeoLocation,
|
|
184
|
+
TargetPosition=TargetPosition,
|
|
185
|
+
Speed=Speed,
|
|
186
|
+
ObjectID=ObjectID,
|
|
187
|
+
)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# onvif/services/receiver.py
|
|
2
|
+
|
|
3
|
+
from ..operator import ONVIFOperator
|
|
4
|
+
from ..utils import ONVIFWSDL
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Receiver:
|
|
8
|
+
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
definition = ONVIFWSDL.get_definition("receiver")
|
|
10
|
+
self.operator = ONVIFOperator(
|
|
11
|
+
definition["path"],
|
|
12
|
+
binding=f"{{{definition['namespace']}}}{definition['binding']}",
|
|
13
|
+
service_path="Receiver", # fallback
|
|
14
|
+
xaddr=xaddr,
|
|
15
|
+
**kwargs,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
def GetServiceCapabilities(self):
|
|
19
|
+
return self.operator.call("GetServiceCapabilities")
|
|
20
|
+
|
|
21
|
+
def GetReceivers(self):
|
|
22
|
+
return self.operator.call("GetReceivers")
|
|
23
|
+
|
|
24
|
+
def GetReceiver(self, ReceiverToken):
|
|
25
|
+
return self.operator.call("GetReceiver", ReceiverToken=ReceiverToken)
|
|
26
|
+
|
|
27
|
+
def CreateReceiver(self, Configuration):
|
|
28
|
+
return self.operator.call("CreateReceiver", Configuration=Configuration)
|
|
29
|
+
|
|
30
|
+
def DeleteReceiver(self, ReceiverToken):
|
|
31
|
+
return self.operator.call("DeleteReceiver", ReceiverToken=ReceiverToken)
|
|
32
|
+
|
|
33
|
+
def ConfigureReceiver(self, ReceiverToken, Configuration):
|
|
34
|
+
return self.operator.call(
|
|
35
|
+
"ConfigureReceiver",
|
|
36
|
+
ReceiverToken=ReceiverToken,
|
|
37
|
+
Configuration=Configuration,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
def SetReceiverMode(self, ReceiverToken, Mode):
|
|
41
|
+
return self.operator.call(
|
|
42
|
+
"SetReceiverMode", ReceiverToken=ReceiverToken, Mode=Mode
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def GetReceiverState(self, ReceiverToken):
|
|
46
|
+
return self.operator.call("GetReceiverState", ReceiverToken=ReceiverToken)
|