Exemplo n.º 1
0
		public Ssrc(int[] payloadTypes, int[] payloadRates)
		{
			JitterBuffers = new JitterBuffer[128];

			for (int i = 0; i < payloadTypes.Length; i++)
				JitterBuffers[payloadTypes[i]] = new JitterBuffer(GetNtpTimestamp)
				{
					Rate = payloadRates[i],
				};
		}
Exemplo n.º 2
0
        public Ssrc(int[] payloadTypes, int[] payloadRates)
        {
            JitterBuffers = new JitterBuffer[128];

            for (int i = 0; i < payloadTypes.Length; i++)
            {
                JitterBuffers[payloadTypes[i]] = new JitterBuffer(GetNtpTimestamp)
                {
                    Rate = payloadRates[i],
                }
            }
            ;
        }
Exemplo n.º 3
0
		public void JitterBufferTest2()
		{
			JitterBuffer buffer = new JitterBuffer(null);

			buffer.Insert(message3);
			buffer.Insert(message3);
			buffer.Insert(message1);
			buffer.Insert(message1);
			buffer.Insert(message2);
			buffer.Insert(message2);

			Assert.AreEqual(3, buffer.Count);
			Assert.AreEqual((UInt16)1, buffer.DequeueAvailable().SequenceNumber);
			Assert.AreEqual((UInt16)2, buffer.DequeueAvailable().SequenceNumber);
			Assert.AreEqual((UInt16)3, buffer.DequeueAvailable().SequenceNumber);
			Assert.IsNull(buffer.DequeueAvailable());
		}