@@ -199,7 +199,7 @@ class ONVIFCamera(object):
199199 def __init__ (self , host , port , user , passwd ,
200200 wsdl_dir = os .path .join (os .path .dirname (os .path .dirname (__file__ )),
201201 "wsdl" ),
202- encrypt = True , daemon = False , no_cache = False , adjust_time = False ,
202+ encrypt = True , daemon = False , no_cache = False , adjust_time = False , event_pullpoint = True ,
203203 transport = None ):
204204 os .environ .pop ('http_proxy' , None )
205205 os .environ .pop ('https_proxy' , None )
@@ -212,6 +212,7 @@ def __init__(self, host, port, user, passwd,
212212 self .daemon = daemon
213213 self .no_cache = no_cache
214214 self .adjust_time = adjust_time
215+ self .event_pullpoint = event_pullpoint
215216 self .transport = transport
216217
217218 # Active service client container
@@ -261,8 +262,9 @@ def update_xaddrs(self):
261262 with self .services_lock :
262263 try :
263264 self .event = self .create_events_service ()
264- self .xaddrs ['http://www.onvif.org/ver10/events/wsdl/PullPointSubscription' ] = \
265- self .event .CreatePullPointSubscription ().SubscriptionReference .Address ._value_1
265+ if self .event_pullpoint :
266+ self .xaddrs ['http://www.onvif.org/ver10/events/wsdl/PullPointSubscription' ] = \
267+ self .event .CreatePullPointSubscription ().SubscriptionReference .Address ._value_1
266268 except Exception :
267269 pass
268270
0 commit comments