public void Dispose() { lock (_sync) { if (_isDisposed) return; if (_session != null) { _session.Dispose(); _session = null; } _isDisposed = true; } }
public void Dispose() { lock (_sync) { if (_isDisposed) { return; } if (_session != null) { _session.Dispose(); _session = null; } _isDisposed = true; } }
public void Connect(String rtspUrl) { lock (_sync) { CheckDisposed(); if (_session != null) _session.Dispose(); if (_hwndSource == IntPtr.Zero) { _hwndSource = GetHwndSourceFromMainWindow(); if (_hwndSource == IntPtr.Zero) throw new NullReferenceException("HwndSource is null"); } _session = new DirectShowSession(this, rtspUrl, _hwndSource, _decoderType, _videoRendererType); } }
public void Connect(String rtspUrl) { lock (_sync) { CheckDisposed(); if (_session != null) { _session.Dispose(); } if (_hwndSource == IntPtr.Zero) { _hwndSource = GetHwndSourceFromMainWindow(); if (_hwndSource == IntPtr.Zero) { throw new NullReferenceException("HwndSource is null"); } } _session = new DirectShowSession(this, rtspUrl, _hwndSource, _decoderType, _videoRendererType); } }