コード例 #1
0
    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();
    }
コード例 #2
0
 private void onStopStreaming()
 {
     streaming = false;
     device    = null;
     if (streams != null)
     {
         streams.Dispose();
         streams = null;
     }
     sensors.Clear();
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
 }