public abstract class RTCPPacket
extends java.lang.Object
Constructor and Description |
---|
RTCPPacket() |
Modifier and Type | Method and Description |
---|---|
abstract byte[] |
createPacket()
Create a RTCP packet.
|
byte[] |
createRtcpPacket(java.util.LinkedList<byte[]> reports)
Create a RTCP packet with each reports created previously.
|
static java.lang.Integer |
decodeCount(byte[] data,
java.lang.Integer offset)
Returns the count header (RC, SC or Subtype).
|
static java.lang.Integer |
decodeLength(byte[] data,
java.lang.Integer offset)
Returns the length header.
|
static java.lang.Integer |
decodePacketType(byte[] data,
java.lang.Integer offset)
Returns the packet type header.
|
static java.lang.Integer |
decodePadding(byte[] data,
java.lang.Integer offset)
Returns the padding.
|
static java.lang.Integer |
decodeTwoComplement(java.lang.Integer value)
Decode the value (RTP use two's complement)
|
static java.lang.Long |
decodeTwoComplement(java.lang.Long value)
Decode the value (RTP use two's complement)
|
static java.lang.Integer |
decodeVersion(byte[] data,
java.lang.Integer offset)
Returns the version.
|
abstract java.lang.Integer |
getPacketType()
Returns the packet type of the RTCP packet.
|
static java.util.LinkedList<RTCPInformation> |
getRtcpPackets(byte[] data,
java.lang.Long time)
Method to separate RTCP report.
|
static boolean |
packetTypeAvailable(java.lang.Integer packetType)
Tells if the packet type is supported by CLIF.
|
public abstract byte[] createPacket()
public abstract java.lang.Integer getPacketType()
public byte[] createRtcpPacket(java.util.LinkedList<byte[]> reports)
reports
- : the report to add to the packet.public static java.util.LinkedList<RTCPInformation> getRtcpPackets(byte[] data, java.lang.Long time)
data
- : the data to decode.time
- : the arrival time of the packet.public static java.lang.Integer decodeVersion(byte[] data, java.lang.Integer offset)
data
- : the raw RTCP packet.offset
- : the offset to start to decode.public static java.lang.Integer decodePadding(byte[] data, java.lang.Integer offset)
data
- : the raw RTCP packet.offset
- : the offset to start to decode.public static java.lang.Integer decodeCount(byte[] data, java.lang.Integer offset)
data
- : the raw RTCP packet.offset
- : the offset to start to decode.public static java.lang.Integer decodePacketType(byte[] data, java.lang.Integer offset)
data
- : the raw RTCP packet.offset
- : the offset to start to decode.public static java.lang.Integer decodeLength(byte[] data, java.lang.Integer offset)
data
- : the raw RTCP packet.offset
- : the offset to start to decode.public static java.lang.Long decodeTwoComplement(java.lang.Long value)
value
- : the value to convert (include between -128 and 127)public static java.lang.Integer decodeTwoComplement(java.lang.Integer value)
value
- : the value to convert (include between -128 and 127)public static boolean packetTypeAvailable(java.lang.Integer packetType)
packetType
- : the packet type to test.