org.ow2.clif.probe.rtp
Class SDESPacket

java.lang.Object
  extended by org.ow2.clif.probe.rtp.RTCPPacket
      extended by org.ow2.clif.probe.rtp.SDESPacket

public class SDESPacket
extends RTCPPacket

Create a RTCP SDES packet. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ header |V=2|P| SC | PT=SDES=202 | length | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ chunk | SSRC/CSRC_1 | 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SDES items | | ... | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ chunk | SSRC/CSRC_2 | 2 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SDES items | | ... | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Cf. RFC 3550 for details about construction of SDES packet.

Author:
Rémi Druilhe

Constructor Summary
SDESPacket()
          Constructor
 
Method Summary
 void addSdesItem(java.lang.Long ssrc, byte[] item)
          Add an item the SDES packet.
 byte[] createItem(java.lang.Integer type, java.lang.String value)
          Create an item to add in an SDES packet.
 byte[] createPacket()
          Method to create a SDES packet.
 java.lang.Integer getItemType(java.lang.String name)
          Returns the value associated to the item name.
 java.lang.Integer getPacketType()
          Returns the packet type.
 
Methods inherited from class org.ow2.clif.probe.rtp.RTCPPacket
createRtcpPacket, decodeCount, decodeLength, decodePacketType, decodePadding, decodeTwoComplement, decodeTwoComplement, decodeVersion, getRtcpPackets, packetTypeAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDESPacket

public SDESPacket()
Constructor

Method Detail

createPacket

public byte[] createPacket()
Method to create a SDES packet.

Specified by:
createPacket in class RTCPPacket
Returns:
the SDES packet in bytes.

addSdesItem

public void addSdesItem(java.lang.Long ssrc,
                        byte[] item)
Add an item the SDES packet.

Parameters:
ssrc - : the SSRC associated to the item.
item - : the item to add to the packet.

createItem

public byte[] createItem(java.lang.Integer type,
                         java.lang.String value)
Create an item to add in an SDES packet.

Parameters:
type - : the numerical type of item.
value - : the value to add to the item.
Returns:
an item of SDES as formated in RFC 3550.

getItemType

public java.lang.Integer getItemType(java.lang.String name)
Returns the value associated to the item name. END : 0 CNAME : 1 NAME : 2 EMAIL : 3 PHONE : 4 LOC : 5 TOOL : 6 NOTE : 7 PRIV : 8

Parameters:
name - : the item type (not case sensitive).
Returns:
the integer value.

getPacketType

public java.lang.Integer getPacketType()
Returns the packet type. Here it is 202.

Specified by:
getPacketType in class RTCPPacket
Returns:
the packet type.