Package org.ow2.clif.probe.rtp
Class AppPacket
- java.lang.Object
-
- org.ow2.clif.probe.rtp.RTCPPacket
-
- org.ow2.clif.probe.rtp.AppPacket
-
public class AppPacket extends RTCPPacket
Create a RTCP APP 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| subtype | PT=APP=204 | length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SSRC/CSRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | name (ASCII) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | application-dependent data ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Cf. RFC 3550 for details about construction of APP packet.- Author:
- Rémi Druilhe
-
-
Constructor Summary
Constructors Constructor Description AppPacket(java.lang.Integer subtype, java.lang.Long ssrc, java.lang.String name, java.lang.String data)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]createPacket()Method to create a APP packet.java.lang.LongdecodeName(byte[] data, java.lang.Integer offset)Decode Name from a APP packet.java.lang.LongdecodeSsrc(byte[] data, java.lang.Integer offset)Decode SSRC from a APP packet.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
-
-
-
-
Constructor Detail
-
AppPacket
public AppPacket(java.lang.Integer subtype, java.lang.Long ssrc, java.lang.String name, java.lang.String data)Constructor- Parameters:
subtype- : the subtype of the packet.ssrc- : the SSRC of the packet.name- : the name of the packet.data- : the data to transmit in the packet (must be less than 500 bytes).
-
-
Method Detail
-
createPacket
public byte[] createPacket()
Method to create a APP packet.- Specified by:
createPacketin classRTCPPacket- Returns:
- the APP packet in bytes.
-
getPacketType
public java.lang.Integer getPacketType()
Returns the packet type. Here it is 204.- Specified by:
getPacketTypein classRTCPPacket- Returns:
- the packet type.
-
decodeSsrc
public java.lang.Long decodeSsrc(byte[] data, java.lang.Integer offset)Decode SSRC from a APP packet.- Parameters:
data- : the data to decode.offset- : the beginning of the report.- Returns:
- SSRC of the packet.
-
decodeName
public java.lang.Long decodeName(byte[] data, java.lang.Integer offset)Decode Name from a APP packet.- Parameters:
data- : the data to decode.offset- : the beginning of the report.- Returns:
- name of the packet.
-
-