Package org.jitsi.impl.neomedia.rtcp
Class RTCPFBPacket
- java.lang.Object
-
- net.sf.fmj.media.rtp.util.Packet
-
- net.sf.fmj.media.rtp.RTCPPacket
-
- org.jitsi.impl.neomedia.rtcp.RTCPFBPacket
-
- Direct Known Subclasses:
NACKPacket,RTCPREMBPacket,RTCPTCCPacket
public class RTCPFBPacket extends net.sf.fmj.media.rtp.RTCPPacketCreated by gp on 6/27/14. 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 | PT | length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SSRC of packet sender | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SSRC of media source | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : Feedback Control Information (FCI) : : :
-
-
Field Summary
Fields Modifier and Type Field Description byte[]fciintfmtFeedback message type (FMT).static intPSFBstatic intRTPFBlongsenderSSRCSSRC of packet sender.longsourceSSRCSSRC of media source.
-
Constructor Summary
Constructors Constructor Description RTCPFBPacket(int fmt, int type, long senderSSRC, long sourceSSRC)RTCPFBPacket(net.sf.fmj.media.rtp.RTCPCompoundPacket base)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassemble(DataOutputStream dataoutputstream)intcalcLength()static org.jitsi.utils.ByteArrayBuffergetFCI(org.jitsi.utils.ByteArrayBuffer baf)Gets the Feedback Control Information (FCI) field of an RTCP FB message.longgetSenderSSRC()longgetSourceSSRC()static longgetSourceSSRC(org.jitsi.utils.ByteArrayBuffer baf)Gets the SSRC of the media source of the packet specified in theByteArrayBufferpassed in as an argument.static booleanisPSFBPacket(org.jitsi.utils.ByteArrayBuffer baf)Gets a boolean that indicates whether or not the packet specified in theByteArrayBufferpassed in as an argument is an RTP FB packet.static booleanisRTCPFBPacket(org.jitsi.utils.ByteArrayBuffer baf)Gets a boolean that indicates whether or not the packet specified in theByteArrayBufferthat is passed in the first argument is an RTCP RTPFB or PSFB packet.static booleanisRTPFBPacket(org.jitsi.utils.ByteArrayBuffer baf)Gets a boolean that indicates whether or not the packet specified in theByteArrayBufferpassed in as an argument is an RTP FB packet.RawPackettoRawPacket()StringtoString()
-
-
-
Field Detail
-
RTPFB
public static final int RTPFB
- See Also:
- Constant Field Values
-
PSFB
public static final int PSFB
- See Also:
- Constant Field Values
-
fci
public byte[] fci
-
fmt
public int fmt
Feedback message type (FMT).
-
senderSSRC
public long senderSSRC
SSRC of packet sender.
-
sourceSSRC
public long sourceSSRC
SSRC of media source.
-
-
Method Detail
-
isRTCPFBPacket
public static boolean isRTCPFBPacket(org.jitsi.utils.ByteArrayBuffer baf)
Gets a boolean that indicates whether or not the packet specified in theByteArrayBufferthat is passed in the first argument is an RTCP RTPFB or PSFB packet.- Parameters:
baf- theByteArrayBufferthat holds the RTCP packet.- Returns:
- true if the packet specified in the
ByteArrayBufferthat is passed in the first argument is an RTCP RTPFB or PSFB packet, otherwise false.
-
isRTPFBPacket
public static boolean isRTPFBPacket(org.jitsi.utils.ByteArrayBuffer baf)
Gets a boolean that indicates whether or not the packet specified in theByteArrayBufferpassed in as an argument is an RTP FB packet.- Parameters:
baf- theByteArrayBufferthat holds the packet- Returns:
- true if the packet specified in the
ByteArrayBufferpassed in as an argument is an RTP FB packet, otherwise false.
-
isPSFBPacket
public static boolean isPSFBPacket(org.jitsi.utils.ByteArrayBuffer baf)
Gets a boolean that indicates whether or not the packet specified in theByteArrayBufferpassed in as an argument is an RTP FB packet.- Parameters:
baf- theByteArrayBufferthat holds the packet- Returns:
- true if the packet specified in the
ByteArrayBufferpassed in as an argument is an RTP FB packet, otherwise false.
-
getSourceSSRC
public static long getSourceSSRC(org.jitsi.utils.ByteArrayBuffer baf)
Gets the SSRC of the media source of the packet specified in theByteArrayBufferpassed in as an argument.- Parameters:
baf- theByteArrayBufferthat holds the packet- Returns:
- the SSRC of the media source of the packet specified in the
ByteArrayBufferpassed in as an argument, or -1 in case of an error.
-
getFCI
public static org.jitsi.utils.ByteArrayBuffer getFCI(org.jitsi.utils.ByteArrayBuffer baf)
Gets the Feedback Control Information (FCI) field of an RTCP FB message.- Parameters:
baf- theByteArrayBufferthat contains the RTCP message.- Returns:
- the Feedback Control Information (FCI) field of an RTCP FB message.
-
assemble
public void assemble(DataOutputStream dataoutputstream) throws IOException
- Specified by:
assemblein classnet.sf.fmj.media.rtp.RTCPPacket- Throws:
IOException
-
calcLength
public int calcLength()
- Specified by:
calcLengthin classnet.sf.fmj.media.rtp.RTCPPacket
-
toString
public String toString()
- Overrides:
toStringin classnet.sf.fmj.media.rtp.util.Packet
-
toRawPacket
public RawPacket toRawPacket() throws IOException
- Returns:
- a
RawPacketrepresentation of thisRTCPFBPacket. - Throws:
IOException
-
getSenderSSRC
public long getSenderSSRC()
- Returns:
- the
Sender SSRCfield of thisRTCPfeedback packet.
-
getSourceSSRC
public long getSourceSSRC()
- Returns:
- the
Source SSRCfield of thisRTCPfeedback packet.
-
-