Exemple #1
0
        public void Process(ArraySegment <byte> payloadSegment)
        {
            if (!RtpPacket.TryParse(payloadSegment, out RtpPacket rtpPacket))
            {
                return;
            }

            if (_rtpSequenceAssembler != null)
            {
                _rtpSequenceAssembler.ProcessPacket(ref rtpPacket);
            }
            else
            {
                ProcessImmediately(ref rtpPacket);
            }
        }
        public void Process(ArraySegment <byte> payloadSegment)
        {
            if (!RtpPacket.TryParse(payloadSegment, out RtpPacket rtpPacket))
            {
#if DEBUG
                Console.WriteLine("[RtpStream] Could not parse packet.");
#endif
                return;
            }

            if (_rtpSequenceAssembler != null)
            {
                _rtpSequenceAssembler.ProcessPacket(ref rtpPacket);
            }
            else
            {
                ProcessImmediately(ref rtpPacket);
            }
        }