Package org.ow2.clif.probe.rtp
Class ByePacket
- java.lang.Object
-
- org.ow2.clif.probe.rtp.RTCPPacket
-
- org.ow2.clif.probe.rtp.ByePacket
-
public class ByePacket extends RTCPPacket
Create a RTCP BYE 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V=2|P| SC | PT=BYE=203 | length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SSRC/CSRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : ... : +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ (opt) | length | reason for leaving ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Cf. RFC 3550 for details about construction of BYE packet.- Author:
- Rémi Druilhe
-
-
Constructor Summary
Constructors Constructor Description ByePacket()Contructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSsrc(java.lang.Long ssrc, java.lang.String reason)Create an element of BYE packet.byte[]createPacket()Method to create a BYE packet.static java.util.ArrayList<java.lang.Long>decodeSsrc(byte[] data, java.lang.Integer offset)List all SSRC present in a RTCP BYE.java.lang.IntegergetPacketType()Returns the packet type.-
Methods inherited from class org.ow2.clif.probe.rtp.RTCPPacket
createRtcpPacket, decodeCount, decodeLength, decodePacketType, decodePadding, decodeTwoComplement, decodeTwoComplement, decodeVersion, getRtcpPackets, packetTypeAvailable
-
-
-
-
Method Detail
-
createPacket
public byte[] createPacket()
Method to create a BYE packet.- Specified by:
createPacketin classRTCPPacket- Returns:
- the BYE packet in bytes.
-
addSsrc
public void addSsrc(java.lang.Long ssrc, java.lang.String reason)Create an element of BYE packet.- Parameters:
ssrc- : the SSRC associated to the report.reason- : the reason for leaving the session (optional). Can be empty.
-
getPacketType
public java.lang.Integer getPacketType()
Returns the packet type. Here it is 203.- Specified by:
getPacketTypein classRTCPPacket- Returns:
- the packet type.
-
decodeSsrc
public static java.util.ArrayList<java.lang.Long> decodeSsrc(byte[] data, java.lang.Integer offset)List all SSRC present in a RTCP BYE.- Parameters:
data- : the data to decode.offset- : the beginning of the report.- Returns:
- a list of all SSRC.
-
-