Esempio n. 1
0
 public void ReadDataFromBuffer(BufferChunk buffer)
 {
     Time        = buffer.NextUInt64();
     TimeStamp   = buffer.NextUInt32();
     PacketCount = buffer.NextUInt32();
     BytesSent   = buffer.NextUInt32();
 }
Esempio n. 2
0
 public void ReadDataFromBuffer(BufferChunk buffer)
 {
     Time = buffer.NextUInt64();
     TimeStamp = buffer.NextUInt32();
     PacketCount = buffer.NextUInt32();
     BytesSent = buffer.NextUInt32();
 }
Esempio n. 3
0
 public void ReadDataFromBuffer(BufferChunk buffer)
 {
     SSRC                       = buffer.NextUInt32();
     FractionLost               = buffer.NextByte();
     PacketsLost                = ThreeBytesToInt(buffer.NextBufferChunk(3));
     ExtendedHighestSequence    = buffer.NextUInt32();
     Jitter                     = buffer.NextUInt32();
     LastSenderReport           = buffer.NextUInt32();
     DelaySinceLastSenderReport = buffer.NextUInt32();
 }
Esempio n. 4
0
        public static GDIPen UnpackGPen(BufferChunk chunk)
        {
            uint     penColor;
            PenStyle penStyle;
            Guid     uniqueID;
            int      penSize;

            penStyle = (PenStyle)chunk.NextInt32();
            penSize  = chunk.NextInt32();
            penColor = chunk.NextUInt32();
            uniqueID = UnpackGuid(chunk);

            GDIPen aPen = new GDIPen(PenType.Cosmetic, PenStyle.Solid, PenJoinStyle.Round, PenEndCap.Round, penColor, penSize, uniqueID);

            return(aPen);
        }
Esempio n. 5
0
        public override void ReadDataFromBuffer(BufferChunk buffer)
        {
            // Make sure ItemCount and Data length agree
            if(Header.Length * 4 != Rtp.SSRC_SIZE + SenderReport.SIZE + 
                ReceiverReport.SIZE * Header.ItemCount)
            {
                Debug.Assert(false, "Header length and item count disagree!");
                throw new RtcpPacketException("Header length and item count disagree!");
            }

            // Read ssrc
            SSRC = buffer.NextUInt32();

            // Parse SenderReport
            sr.ReadDataFromBuffer(buffer);

            // Process Reports
            if(Header.ItemCount > 0)
            {
                receiverReports = new ArrayList();

                for(int rrCount = 0; rrCount < Header.ItemCount; rrCount++)
                {
                    ReceiverReport rr = new ReceiverReport();
                    rr.ReadDataFromBuffer(buffer);

                    receiverReports.Add(rr);
                }
            }
        }
Esempio n. 6
0
        public override void ReadDataFromBuffer(BufferChunk buffer)
        {
            // Make sure ItemCount and Data length agree
            if(Header.Length * 4 != Header.ItemCount * ReceiverReport.SIZE + Rtp.SSRC_SIZE)
            {
                Debug.Assert(false, "Header length and item count disagree!");
                throw new RtcpPacketException("Header length and item count disagree!");
            }

            // Store Reporter SSRC
            SSRC = buffer.NextUInt32();

            // Process Reports
            for(int rrCount = 0; rrCount < Header.ItemCount; rrCount++)
            {
                ReceiverReport rr = new ReceiverReport();
                rr.ReadDataFromBuffer(buffer);

                receiverReports.Add(rr);
            }
        }
Esempio n. 7
0
        public override void ReadDataFromBuffer(BufferChunk buffer)
        {
            SSRC = buffer.NextUInt32();
            name = (byte[])buffer.NextBufferChunk(4);

            if(buffer.Length != 0)
            {
                data = (byte[])buffer.NextBufferChunk(buffer.Length);
            }
        }
Esempio n. 8
0
        /// <summary>
        /// Converts buffer into member data
        /// </summary>
        /// <param name="packet"></param>
        public override void ReadDataFromBuffer(BufferChunk buffer)
        {
            // Read SSRCs
            for(int i = 0; i < Header.ItemCount; i++)
            {
                ssrcs.Add(buffer.NextUInt32());
            }

            // Determine if there is a reason...
            // SSRCs are 32 bits each, Length is number of 32 bit words in packet data
            if(Header.Length > Header.ItemCount)
            {
                reason = (byte[])buffer.NextBufferChunk(buffer.NextByte());
            }
        }
Esempio n. 9
0
        private void ReadReportFromBuffer(BufferChunk buffer)
        {
            uint ssrc = buffer.NextUInt32();
            SdesData props = new SdesData(buffer);

            AddReport(new SdesReport(ssrc, props));
        }
Esempio n. 10
0
 public void ReadDataFromBuffer(BufferChunk buffer)
 {
     SSRC = buffer.NextUInt32();
     FractionLost = buffer.NextByte();
     PacketsLost = ThreeBytesToInt(buffer.NextBufferChunk(3));
     ExtendedHighestSequence = buffer.NextUInt32();
     Jitter = buffer.NextUInt32();
     LastSenderReport = buffer.NextUInt32();
     DelaySinceLastSenderReport = buffer.NextUInt32();
 }