/// <summary> /// Dispose method. /// </summary> public void Dispose() { if (this.device != null) { ((IDisposable)this.device).Dispose(); this.device = null; } }
/// <summary> /// Dispose method. /// </summary> public void Dispose() { if (this.device != null) { this.device.Dispose(); this.device = null; } }
/// <inheritdoc/> public void Start(Action <DateTime> notifyCompletionTime) { // notify that this is an infinite source component notifyCompletionTime(DateTime.MaxValue); this.device = new RealSenseDevice(); this.thread = new Thread(new ThreadStart(this.ThreadProc)); this.thread.Start(); }
private void Start() { device = new RealSenseDevice(); device.OnFrameDataArrived += Device_OnFrameDataArrived; device.Open(); texture = new Texture2D(device.DeviceConfiguration.ColorProfile.Width, device.DeviceConfiguration.ColorProfile.Height, TextureFormat.RGB24, false); image.texture = texture; }
/// <inheritdoc/> public void Stop() { if (this.thread != null) { this.shutdown = true; TimeSpan waitTime = new TimeSpan(0, 0, 1); if (this.thread.Join(waitTime) != true) { this.thread.Abort(); } } if (this.device != null) { this.device = null; } }
/// <inheritdoc/> public void Stop(DateTime finalOriginatingTime, Action notifyCompleted) { if (this.thread != null) { this.shutdown = true; TimeSpan waitTime = new TimeSpan(0, 0, 1); if (this.thread.Join(waitTime) != true) { this.thread.Abort(); } } if (this.device != null) { this.device = null; } notifyCompleted(); }
/// <summary> /// Called once all the subscriptions are established. /// </summary> private void OnPipelineStart() { this.device = new RealSenseDevice(); this.thread = new Thread(new ThreadStart(ThreadProc)); this.thread.Start(); }
/// <summary> /// Dispose method /// </summary> public void Dispose() { this.device?.Dispose(); this.device = null; }