def __init__(self, uri, mode = None): self._orig_uri = uri self.uri = uri self._mode = mode HandleObject.__init__(self, None) self._reopen() _registered_devices.add(self)
def __init__(self, uri, mode=None): self._orig_uri = uri self.uri = uri self._mode = mode HandleObject.__init__(self, None) self._reopen() _registered_devices.add(self)
def __init__(self, hand_tracker): self.hand_tracker = hand_tracker self._callbacks = c_api.NiteHandTrackerCallbacks( readyForNextFrame=c_api.OniGeneralCallback(self._on_ready_for_next_frame)) handle = ctypes.pointer(self._callbacks) c_api.niteRegisterHandTrackerCallbacks(self.hand_tracker._handle, handle, None) HandleObject.__init__(self, handle) _registered_hand_tracker_listeners.add(self)
def __init__(self, hand_tracker_handle, pframe): self._hand_tracker_handle = hand_tracker_handle self._frame = pframe[0] c_api.niteHandTrackerFrameAddRef(hand_tracker_handle, pframe) HandleObject.__init__(self, pframe) self._depth_frame = None self._hands = None self._gestures = None _registered_hand_tracker_frames.add(self)
def __init__(self, hand_tracker): self.hand_tracker = hand_tracker self._callbacks = c_api.NiteHandTrackerCallbacks( readyForNextFrame=c_api.OniGeneralCallback( self._on_ready_for_next_frame)) handle = ctypes.pointer(self._callbacks) c_api.niteRegisterHandTrackerCallbacks(self.hand_tracker._handle, handle, None) HandleObject.__init__(self, handle) _registered_hand_tracker_listeners.add(self)
def __init__(self, device): handle = c_api.NiteUserTrackerHandle() if not device: c_api.niteInitializeUserTracker(ctypes.byref(handle)) else: self._devstruct = _NiteDevStruct() self._devstruct.device = device._handle c_api.niteInitializeUserTrackerByDevice(ctypes.byref(self._devstruct), ctypes.byref(handle)) HandleObject.__init__(self, handle) _registered_user_trackers.add(self)
def __init__(self, device): handle = c_api.NiteUserTrackerHandle() if not device: c_api.niteInitializeUserTracker(ctypes.byref(handle)) else: self._devstruct = _NiteDevStruct() self._devstruct.device = device._handle c_api.niteInitializeUserTrackerByDevice( ctypes.byref(self._devstruct), ctypes.byref(handle)) HandleObject.__init__(self, handle) _registered_user_trackers.add(self)
def __init__(self): handle = c_api.OniCallbackHandle() self._callbacks = c_api.OniDeviceCallbacks( deviceConnected = c_api.OniDeviceInfoCallback(self._on_connected), deviceDisconnected = c_api.OniDeviceInfoCallback(self._on_disconnected), deviceStateChanged = c_api.OniDeviceStateCallback(self._on_state_changed), ) c_api.oniRegisterDeviceCallbacks(self._callbacks, None, ctypes.byref(handle)) HandleObject.__init__(self, handle) _registered_device_listeners.add(self) self._connected_uris = set() self._disconnected_uris = set()
def __init__(self, pframe, user_tracker_handle): self._frame = pframe[0] self._user_tracker_handle = user_tracker_handle self._depth_frame = None c_api.niteUserTrackerFrameAddRef(user_tracker_handle, pframe) HandleObject.__init__(self, pframe) self.users = [] self.users_by_id = {} for i in range(self.userCount): u = UserData(self.pUser[i]) self.users.append(u) self.users_by_id[u.id] = u _registered_user_tracker_frames.add(self)
def __init__(self, device, sensor_type): self.device = device self.sensor_type = sensor_type self._callbacks = {} handle = c_api.OniStreamHandle() c_api.oniDeviceCreateStream(self.device._handle, sensor_type, ctypes.byref(handle)) HandleObject.__init__(self, handle) _registered_video_streams.add(self) if (self.is_property_supported(c_api.ONI_STREAM_PROPERTY_AUTO_WHITE_BALANCE) and self.is_property_supported(c_api.ONI_STREAM_PROPERTY_AUTO_EXPOSURE)): self.camera = CameraSettings(self) else: self.camera = None
def __init__(self, device): handle = c_api.NiteUserTrackerHandle() if not device: c_api.niteInitializeUserTracker(ctypes.byref(handle)) else: self._devstruct = _NiteDevStruct() self._devstruct.pPlaybackControl = None self._devstruct.device = device._handle self._devstruct.device_info = device.get_device_info() # self._devstruct.sensor_info = device.get_sensor_infos(sensor_type) self._devstruct.is_owner = True c_api.niteInitializeUserTrackerByDevice(ctypes.byref(self._devstruct), ctypes.byref(handle)) HandleObject.__init__(self, handle) _registered_user_trackers.add(self)
def __init__(self, device): handle = c_api.NiteUserTrackerHandle() if not device: c_api.niteInitializeUserTracker(ctypes.byref(handle)) else: self._devstruct = _NiteDevStruct() self._devstruct.pPlaybackControl = None self._devstruct.device = device._handle self._devstruct.device_info = device.get_device_info() # self._devstruct.sensor_info = device.get_sensor_infos(sensor_type) self._devstruct.is_owner = True c_api.niteInitializeUserTrackerByDevice( ctypes.byref(self._devstruct), ctypes.byref(handle)) HandleObject.__init__(self, handle) _registered_user_trackers.add(self)
def __init__(self, filename): self.filename = filename handle = c_api.OniRecorderHandle() c_api.oniCreateRecorder(filename, ctypes.byref(handle)) HandleObject.__init__(self, handle) _registered_recorders.add(self)
def __init__(self, pframe): self._frame = pframe[0] HandleObject.__init__(self, pframe) _registered_video_frames.add(self)