public void Dispose() { if (SourceReader != null) { SourceReader.Close(); SourceReader.Dispose(); } if (TargetWriter != null) { TargetWriter.Flush(); TargetWriter.Close(); TargetWriter.Dispose(); } if (SourceStream != null) { SourceStream.Close(); SourceStream.Dispose(); } if (TargetStream != null) { TargetStream.Close(); TargetStream.Dispose(); } }
private void DisposeInternal() { if (_reader != null) { _reader.Dispose(); _reader = null; } if (_byteStream != null) { _byteStream.Dispose(); _byteStream = null; } }
protected override void Dispose(bool disposing) { if (disposing) { if (stream != null) { stream.Dispose(); } if (reader != null) { reader.Dispose(); } } base.Dispose(disposing); }
public void Close() { logger.Debug("VideoCaptureSource::Close()"); if (mediaSource != null) { //mediaSource?.Shutdown(); mediaSource.Dispose(); mediaSource = null; } if (sourceReader != null) { sourceReader.Dispose(); sourceReader = null; } if (device != null) { device.Dispose(); device = null; } if (SharedTexture != null) { SharedTexture.Dispose(); SharedTexture = null; } if (texture != null) { texture.Dispose(); texture = null; } if (processor != null) { processor.Close(); processor = null; } }
public void Close() { logger.Debug("VideoCaptureSource::Close()"); if (mediaSource != null) { //mediaSource?.Shutdown(); mediaSource.Dispose(); mediaSource = null; } if (sourceReader != null) { sourceReader.Dispose(); sourceReader = null; } if (OutputMediaType != null) { OutputMediaType.Dispose(); OutputMediaType = null; } }
public void Dispose() { SourceReader.Dispose(); }