Example #1
0
        public void Dispose()
        {
            lock (_sync)
            {
                if (_isDisposed) return;

                if (_session != null)
                {
                    _session.Dispose();
                    _session = null;
                }

                _isDisposed = true;
            }
        }
Example #2
0
        public void Dispose()
        {
            lock (_sync)
            {
                if (_isDisposed)
                {
                    return;
                }

                if (_session != null)
                {
                    _session.Dispose();
                    _session = null;
                }

                _isDisposed = true;
            }
        }
Example #3
0
        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);
            }
        }
Example #4
0
        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);
            }
        }