public class NACKPacket 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=1 | PT=205 | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SSRC of packet sender |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SSRC of media source |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FCI |
| [...] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Feedback Control Information (FCI) field consists of one or more
32-bit words, each with the following structure:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PID | BLP |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Modifier and Type | Field and Description |
|---|---|
static int |
FMT
The value of the "fmt" field for a NACK packet.
|
fci, fmt, PSFB, RTPFB, senderSSRC, sourceSSRC| Constructor and Description |
|---|
NACKPacket(long senderSSRC,
long sourceSSRC,
Collection<Integer> lostPackets)
Initializes a new NACKPacket instance with specific "packet
sender SSRC" and "media source SSRC" values and which describes a
specific set of sequence numbers.
|
NACKPacket(net.sf.fmj.media.rtp.RTCPCompoundPacket base)
Initializes a new NACKPacket instance.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<Integer> |
getLostPackets() |
static Collection<Integer> |
getLostPackets(org.jitsi.utils.ByteArrayBuffer baf) |
static Collection<Integer> |
getLostPacketsFci(org.jitsi.utils.ByteArrayBuffer fciBuffer) |
static boolean |
isNACKPacket(org.jitsi.utils.ByteArrayBuffer baf)
Gets a boolean indicating whether or not the RTCP packet specified in the
ByteArrayBuffer that is passed as an argument is a NACK packet or
not. |
String |
toString() |
assemble, calcLength, getFCI, getSenderSSRC, getSourceSSRC, getSourceSSRC, isPSFBPacket, isRTCPFBPacket, isRTPFBPacket, toRawPacketpublic static final int FMT
public NACKPacket(net.sf.fmj.media.rtp.RTCPCompoundPacket base)
base - public NACKPacket(long senderSSRC,
long sourceSSRC,
Collection<Integer> lostPackets)
senderSSRC - the value to use for the "packet sender SSRC" field.sourceSSRC - the value to use for the "media source SSRC" field.lostPackets - the set of RTP sequence numbers which this NACK
packet is to describe.
Note that this implementation is not optimized and might not always use
the minimal possible number of bytes to describe a given set of packets.
Specifically, it does not take into account that sequence numbers wrap
at 2^16 and fails to pack numbers close to 2^16 with those close to 0.public static boolean isNACKPacket(org.jitsi.utils.ByteArrayBuffer baf)
ByteArrayBuffer that is passed as an argument is a NACK packet or
not.baf - the ByteArrayBufferpublic static Collection<Integer> getLostPackets(org.jitsi.utils.ByteArrayBuffer baf)
baf - the NACK packet.ByteArrayBuffer.public static Collection<Integer> getLostPacketsFci(org.jitsi.utils.ByteArrayBuffer fciBuffer)
fciBuffer - the ByteArrayBuffer which represents the FCI
field of a NACK packet.ByteArrayBuffer.public Collection<Integer> getLostPackets()
public String toString()
toString in class RTCPFBPacketCopyright © 2021 jitsi.org. All rights reserved.