Exemplo n.º 1
0
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

        private bool ProcessNewStream(Contracts.IPacketProvider packetProvider)
        {
            var decoder = CreateStreamDecoder(packetProvider);

            decoder.ClipSamples = true;

            var ea = new NewStreamEventArgs(decoder);

            NewStream?.Invoke(this, ea);
            if (!ea.IgnoreStream)
            {
                _decoders.Add(decoder);
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
        private bool NewStreamCallback(LightPacketProvider packetProvider)
        {
            var relock = _reader.Release();
            var ea     = new NewStreamEventArgs(packetProvider);

            try
            {
                NewStream?.Invoke(this, ea);
            }
            finally
            {
                if (relock)
                {
                    _reader.Lock();
                }
            }
            return(!ea.IgnoreStream);
        }