private void onStopStreaming() { streaming = false; if (device != null) { device.Dispose(); device = null; } if (streams != null) { streams.Dispose(); streams = null; } foreach (var s in sensors) { var sensor = s.Value; if (sensor != null) { sensor.Dispose(); } } sensors.Clear(); sensorOptions.Clear(); }
private void onStopStreaming() { streaming = false; device = null; if (streams != null) { streams.Dispose(); streams = null; } sensors.Clear(); }
private void onStartStreaming(PipelineProfile profile) { device = profile.Device; streams = profile.Streams; sensors.Clear(); foreach (var s in profile.Device.Sensors) { sensors.Add(s.Info[CameraInfo.Name], s); sensorsOptions.AddRange(s.Options); } streaming = true; }
private void onStartStreaming(PipelineProfile profile) { device = profile.Device; streams = profile.Streams; using (var sensorList = device.Sensors) { foreach (var s in sensorList) { var sensorName = s.Info[CameraInfo.Name]; sensors.Add(sensorName, s); sensorOptions.Add(sensorName, s.Options.ToList()); } } streaming = true; }