示例#1
0
    void OnDisable()
    {
        OnNewSample    = null;
        OnNewSampleSet = null;

        if (worker != null)
        {
            stopEvent.Set();
            worker.Join();
        }

        if (Streaming && OnStop != null)
        {
            OnStop();
        }

        if (m_pipeline != null)
        {
            if (Streaming)
            {
                m_pipeline.Stop();
            }
            m_pipeline.Release();
            m_pipeline = null;
        }

        Streaming = false;

        if (ActiveProfile != null)
        {
            ActiveProfile.Dispose();
            ActiveProfile = null;
        }
    }
        public override void CloseSensor(KinectInterop.SensorData sensorData)
        {
            base.CloseSensor(sensorData);

            if (activeProfile != null)
            {
                activeProfile.Dispose();
                activeProfile = null;
            }

            if (m_pipeline != null)
            {
                m_pipeline.Dispose();
                m_pipeline = null;
            }

            Debug.Log("RealSense-sensor closed");
        }
        public override void CloseSensor(KinectInterop.SensorData sensorData)
        {
            base.CloseSensor(sensorData);

            if (activeProfile != null)
            {
                activeProfile.Dispose();
                activeProfile = null;
            }

            if (m_pipeline != null)
            {
                m_pipeline.Dispose();
                m_pipeline = null;
            }

            if (consoleLogMessages)
            {
                Debug.Log("RealSense-sensor closed: " + sensorDeviceId);
            }
        }
示例#4
0
 /**关闭realsense
  * **/
 public void Stop()
 {
     pipeline.Stop();
     profile.Dispose();
 }