Example #1
0
        private void Stop()
        {
            if (outputStream != null)
            {
                outputStream.Stop();
                outputStream.Dispose();
                outputStream = null;
            }

            if (inputStream != null)
            {
                inputStream.Stop();
                inputStream.Dispose();
                inputStream = null;
            }

            if (captureFile != null)
            {
                captureFile.Flush();
                captureFile.Dispose();
                captureFile = null;
            }

            stop.Enabled              = false;
            panel.Enabled             = true;
            start.Enabled             = true;
            streamRaw.Enabled         = true;
            bufferSize.Enabled        = true;
            streamType.Enabled        = true;
            outputMaster.Enabled      = true;
            secondaryInput.Enabled    = true;
            secondaryOutput.Enabled   = true;
            streamInterleaved.Enabled = true;
        }
Example #2
0
 void Stop()
 {
     _stream?.Stop();
     _stream?.Dispose();
     _stream = null;
     _captureFile?.Flush();
     _captureFile?.Dispose();
     _captureFile = null;
     _safeBuffer?.Dispose();
     _safeBuffer = null;
 }