示例#1
0
        public static List <RtcpMessage> Parse(byte[] bytes, ref int startIndex, int length)
        {
            List <RtcpMessage> messages = new List <RtcpMessage>();

            while (startIndex < length)
            {
                var message = new RtcpMessage();
                message.Parse2(bytes, ref startIndex, length);

                messages.Add(message);
            }

            return(messages);
        }
示例#2
0
		public static List<RtcpMessage> Parse(byte[] bytes, ref int startIndex, int length)
		{
			List<RtcpMessage> messages = new List<RtcpMessage>();

			while (startIndex < length)
			{
				var message = new RtcpMessage();
				message.Parse2(bytes, ref startIndex, length);

				messages.Add(message);
			}

			return messages;
		}
示例#3
0
        public void EnqueueMessage(byte[] bytes, int startIndex, int length)
        {
            if (RtpMessage.IsRtpMessage(bytes, startIndex, length))
            {
                var rtpMessage = RtpMessage.Parse(bytes, startIndex, length);

                if (rtpMessage.PayloadType == dtmfEventPayloadType)
                {
                    rtpMessage.Payload = DtmfEventMessage.Parse(bytes,
                                                                rtpMessage.GetPayloadOffset(startIndex), length);
                }

                rtpReceiver.InsertMessage(rtpMessage);
            }
            else if (RtcpMessage.IsRtcpMessage(bytes, startIndex, length))
            {
                rtpReceiver.ProcessMessages(
                    RtcpMessage.Parse(bytes, startIndex, length));
            }
        }