public bool IsFileReady() { bool result = true; if (_handle >= 0) { result = NativePlugin.IsFileWritingComplete(_handle); if (result) { if (_videoEncodingHints != null) { result = StartPostProcess(); _videoEncodingHints = null; } if (_postProcessEvent != null) { result = _postProcessEvent.WaitOne(1); } if (result) { Dispose(); } } } return(result); }