Ejemplo n.º 1
0
        public void StopListening()
        {
            if (rtpStream != null)
            {
                rtpStream.FrameReceived -= new RtpStream.FrameReceivedEventHandler(FrameReceived);
                this.rtpStream           = null;
            }

            int curIndex = curBufIndex;

            if (buffers != null)
            {
                do
                {
                    BufferManager buf = buffers[curBufIndex];
                    perfCounter.RemoveInstanceForCollection(buf);
                    buf.Dispose();

                    curBufIndex = (curBufIndex + 1) % bufferCount;
                }while (curBufIndex != curIndex);

                this.buffers = null;
            }
        }