Exemplo n.º 1
0
        public object Clone()
        {
            RtcpHeader clone = new RtcpHeader(PacketType);

            clone.ItemCount = ItemCount;
            clone.Length = Length;
            clone.Padding = Padding;

            return clone;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor which creates a generic RtcpPacket from an existing buffer
 /// </summary>
 /// <param name="buffer"></param>
 public RtcpPacket(BufferChunk buffer)
 {
     header = new RtcpHeader(buffer.NextBufferChunk(RtcpHeader.SIZE));
     this.buffer = buffer.NextBufferChunk(Header.Length * 4);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Converts packet's data into derived class member data
        /// </summary>
        /// <param name="packet"></param>
        protected void ProcessPacket(RtcpPacket packet)
        {
            ValidatePacketType(Header.PacketType, packet.Header.PacketType);

            // Store the header
            header = packet.Header;

            // Do the real work
            ReadDataFromBuffer(packet.buffer);

            // Leave the buffer 32 bit aligned
            RemovePadding(packet.buffer);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Constructor which initializes header for use by derived packets
 /// </summary>
 protected RtcpPacket(Rtcp.PacketType type)
 {
     header = new RtcpHeader((byte)type);
 }