Exemple #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);
        }
Exemple #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;
		}
Exemple #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));
            }
        }