Пример #1
0
        public void Dispose()
        {
            var thread = _threadRecord;

            _threadRecord = null;
            if (thread == null)
            {
                return;
            }
            _eventCancel.Set();
            thread.Join();
            _eventFrame.Dispose();
            _eventCancel.Dispose();
            _writer.Dispose();
        }
Пример #2
0
        public void Dispose()
        {
            var thread = _threadRecord;

            _threadRecord = null;
            if (thread == null)
            {
                return;
            }
            _eventCancel.Set();
            thread.Join();
            _bitmap.Dispose();
            if (_bitmapRaw != null)
            {
                _bitmapRaw.Dispose();
            }
            _eventFrame.Dispose();
            _eventCancel.Dispose();
            _writerMP4.Close();
            _writerWAV.Dispose();
        }