public class RTCPTCCPacket extends RTCPFBPacket
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| FMT=15 | PT=205 | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SSRC of packet sender |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SSRC of media source |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| base sequence number | packet status count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| reference time | fb pkt. count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| packet chunk | packet chunk |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| packet chunk | recv delta | recv delta |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| recv delta | recv delta | zero padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Modifier and Type | Class and Description |
---|---|
static class |
RTCPTCCPacket.PacketMap
An ordered collection which maps sequence numbers to timestamps, the
order is by the sequence number.
|
Modifier and Type | Field and Description |
---|---|
static int |
FMT
The value of the "fmt" field for a transport-cc RTCP feedback packet.
|
static int |
MAX_PACKET_COUNT
The maximum number of packets (including missing packets) to include
in an
RTCPTCCPacket being constructed for a list of packets. |
fci, fmt, PSFB, RTPFB, senderSSRC, sourceSSRC
Constructor and Description |
---|
RTCPTCCPacket(long senderSSRC,
long sourceSSRC,
RTCPTCCPacket.PacketMap packets,
byte fbPacketCount,
DiagnosticContext diagnosticContext)
Initializes a new
RTCPTCCPacket instance with a specific "packet
sender SSRC" and "media source SSRC" values, and which describes a
specific set of sequence numbers. |
RTCPTCCPacket(net.sf.fmj.media.rtp.RTCPCompoundPacket base)
Initializes a new RTCPTCCPacket instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getFbPacketCount() |
RTCPTCCPacket.PacketMap |
getPackets() |
static RTCPTCCPacket.PacketMap |
getPackets(ByteArrayBuffer baf) |
static RTCPTCCPacket.PacketMap |
getPacketsFromFci(ByteArrayBuffer fciBuffer) |
(package private) static RTCPTCCPacket.PacketMap |
getPacketsFromFci(ByteArrayBuffer fciBuffer,
boolean includeNotReceived) |
static long |
getReferenceTime250us(ByteArrayBuffer fciBuffer) |
static boolean |
isTCCPacket(ByteArrayBuffer baf)
Gets a boolean indicating whether or not the RTCP packet specified in the
ByteArrayBuffer that is passed as an argument is a TCC packet or
not. |
java.lang.String |
toString() |
assemble, calcLength, getFCI, getSenderSSRC, getSourceSSRC, getSourceSSRC, isPSFBPacket, isRTCPFBPacket, isRTPFBPacket, toRawPacket
public static final int MAX_PACKET_COUNT
RTCPTCCPacket
being constructed for a list of packets.public static final int FMT
public RTCPTCCPacket(net.sf.fmj.media.rtp.RTCPCompoundPacket base)
base
- public RTCPTCCPacket(long senderSSRC, long sourceSSRC, RTCPTCCPacket.PacketMap packets, byte fbPacketCount, DiagnosticContext diagnosticContext)
RTCPTCCPacket
instance with a specific "packet
sender SSRC" and "media source SSRC" values, and which describes a
specific set of sequence numbers.senderSSRC
- the value to use for the "packet sender SSRC" field.sourceSSRC
- the value to use for the "media source SSRC" field.packets
- the set of RTP sequence numbers and their reception
timestamps which this packet is to describe. Note that missing sequence
numbers, as well as those mapped to a negative will be interpreted as
missing (not received) packets.fbPacketCount
- the index of this feedback packet, to be used in the
"fb pkt count" field.diagnosticContext
- the DiagnosticContext
to use to print
diagnostic information.
Warning: The timestamps for the packets are expected to be in
millisecond increments, which is different than the output map produced
after parsing a packet!
Note: this implementation is not optimized and might not always use
the minimal possible number of bytes to describe a given set of packets.public static boolean isTCCPacket(ByteArrayBuffer baf)
ByteArrayBuffer
that is passed as an argument is a TCC packet or
not.baf
- the ByteArrayBuffer
public static RTCPTCCPacket.PacketMap getPackets(ByteArrayBuffer baf)
baf
- the buffer which contains the RTCP packet.RTCPTCCPacket(long, long, PacketMap, byte,
DiagnosticContext)
.public static long getReferenceTime250us(ByteArrayBuffer fciBuffer)
public static RTCPTCCPacket.PacketMap getPacketsFromFci(ByteArrayBuffer fciBuffer)
fciBuffer
- the buffer which contains the FCI portion of the RTCP
feedback packet.RTCPTCCPacket(long, long, PacketMap, byte,
DiagnosticContext)
.
Note that packets described as lost are NOT included in the results.static RTCPTCCPacket.PacketMap getPacketsFromFci(ByteArrayBuffer fciBuffer, boolean includeNotReceived)
fciBuffer
- the buffer which contains the FCI portion of the RTCP
feedback packet.includeNotReceived
- whether the returned map should include the
packets described in the feedback packet as lost. Note that the RLE
encoding allows ~2^16 packets to be described as lost in just a few
bytes, so when parsing packets coming over the network it is wise to
not blindly set this option to true
.RTCPTCCPacket(long, long, PacketMap, byte,
DiagnosticContext)
.public RTCPTCCPacket.PacketMap getPackets()
RTCPTCCPacket
.
Warning: the timestamps are represented in the 250µs format used by the
on-the-wire format, and don't represent local time. This is different
than the timestamps expected as input when constructing a packet with
RTCPTCCPacket(long, long, PacketMap, byte,
DiagnosticContext)
.public int getFbPacketCount()
public java.lang.String toString()
toString
in class RTCPFBPacket
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.