Ejemplo n.º 1
0
 /// <summary>
 /// Stop streaming buffers and close device.
 /// </summary>
 public void Close()
 {
     LinuxVideoInterop.StreamOff(this.handle);
     if (this.file != null)
     {
         this.file.Close();
         this.file.Dispose();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Stop streaming buffers and close device.
        /// </summary>
        public void Close()
        {
            if (this.file != null)
            {
                // stop any running background thread and wait for it to terminate
                this.isStopping = true;
                this.background?.Join();

                LinuxVideoInterop.StreamOff(this.handle);
                this.file.Close();
                this.file.Dispose();
                this.file = null;
            }
        }