Package org.jitsi.service.neomedia.rtp
Class RTCPExtendedReport
- java.lang.Object
-
- net.sf.fmj.media.rtp.util.Packet
-
- net.sf.fmj.media.rtp.RTCPPacket
-
- org.jitsi.service.neomedia.rtp.RTCPExtendedReport
-
public class RTCPExtendedReport extends net.sf.fmj.media.rtp.RTCPPacketRepresents an RTP Control Protocol Extended Report (RTCP XR) packet in the terms of FMJ i.e. as an RTCPPacket sub-class.- Author:
- Lyubomir Marinov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRTCPExtendedReport.ReportBlockRepresents an abstract, base extended report block.static classRTCPExtendedReport.VoIPMetricsReportBlockImplements "VoIP Metrics Report Block" i.e.
-
Field Summary
Fields Modifier and Type Field Description static StringSDP_ATTRIBUTEstatic intXRThe packet type (PT) constant 207 which identifies RTCP XR packets.
-
Constructor Summary
Constructors Constructor Description RTCPExtendedReport()Initializes a new RTCPExtendedReport instance.RTCPExtendedReport(byte[] buf, int off, int len)Initializes a new RTCPExtendedReport instance by deserializing/reading a binary representation from a byte array.RTCPExtendedReport(int b0, int pt, int length, DataInputStream datainputstream)Initializes a new RTCPExtendedReport instance by deserializing/reading a binary representation of part of the packet from a DataInputStream, and taking the values found in the first 4 bytes of the binary representation as arguments.RTCPExtendedReport(DataInputStream datainputstream)Initializes a new RTCPExtendedReport instance by deserializing/reading a binary representation from a DataInputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddReportBlock(RTCPExtendedReport.ReportBlock reportBlock)Adds an extended report block to this extended report.voidassemble(DataOutputStream dataoutputstream)intcalcLength()intgetReportBlockCount()Gets the number of the extended report blocks carried by this RTCPExtendedReport.List<RTCPExtendedReport.ReportBlock>getReportBlocks()Gets a list of the extended report blocks carried by this RTCPExtendedReport.intgetSSRC()Gets the synchronization source identifier (SSRC) of the originator of this XR packet.longgetSystemTimeStamp()Gets the System time in milliseconds at which this RTCPExtendedReport has been received or sent by the local endpoint.booleanremoveReportBlock(RTCPExtendedReport.ReportBlock reportBlock)Removes an extended report block from this extended report.voidsetSSRC(int ssrc)Sets the synchronization source identifier (SSRC) of the originator of this XR packet.voidsetSystemTimeStamp(long systemTimeStamp)Sets the System time in milliseconds at which this RTCPExtendedReport has been received or sent by the local endpoint.StringtoString()
-
-
-
Field Detail
-
SDP_ATTRIBUTE
public static final String SDP_ATTRIBUTE
- See Also:
- Constant Field Values
-
XR
public static final int XR
The packet type (PT) constant 207 which identifies RTCP XR packets.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RTCPExtendedReport
public RTCPExtendedReport()
Initializes a new RTCPExtendedReport instance.
-
RTCPExtendedReport
public RTCPExtendedReport(byte[] buf, int off, int len) throws IOExceptionInitializes a new RTCPExtendedReport instance by deserializing/reading a binary representation from a byte array.- Parameters:
buf- the binary representation from which the new instance is to be initializedoff- the offset in buf at which the binary representation startslen- the number of bytes in buf starting at off which comprise the binary representation- Throws:
IOException- if an input/output error occurs while deserializing/reading the new instance from buf or the binary representation does not parse into an RTCPExtendedReport instance
-
RTCPExtendedReport
public RTCPExtendedReport(DataInputStream datainputstream) throws IOException
Initializes a new RTCPExtendedReport instance by deserializing/reading a binary representation from a DataInputStream.- Parameters:
datainputstream- the binary representation from which the new instance is to be initialized.- Throws:
IOException- if an input/output error occurs while deserializing/reading the new instance from datainputstream or the binary representation does not parse into an RTCPExtendedReport instance.
-
RTCPExtendedReport
public RTCPExtendedReport(int b0, int pt, int length, DataInputStream datainputstream) throws IOExceptionInitializes a new RTCPExtendedReport instance by deserializing/reading a binary representation of part of the packet from a DataInputStream, and taking the values found in the first 4 bytes of the binary representation as arguments.- Parameters:
b0- the first byte of the binary representation.pt- the value of thepacket typefield.length- the value of thelengthfield.datainputstream- the binary representation from which the new instance is to be initialized, excluding the first 4 bytes.- Throws:
IOException- if an input/output error occurs while deserializing/reading the new instance from datainputstream or the binary representation does not parse into an RTCPExtendedReport instance.
-
-
Method Detail
-
addReportBlock
public boolean addReportBlock(RTCPExtendedReport.ReportBlock reportBlock)
Adds an extended report block to this extended report.- Parameters:
reportBlock- the extended report block to add to this extended report- Returns:
- true if the list of extended report blocks carried by this extended report changed because of the method invocation; otherwise, false
- Throws:
NullPointerException- if reportBlock is null
-
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
-
getReportBlockCount
public int getReportBlockCount()
Gets the number of the extended report blocks carried by this RTCPExtendedReport.- Returns:
- the number of the extended report blocks carried by this RTCPExtendedReport
-
getReportBlocks
public List<RTCPExtendedReport.ReportBlock> getReportBlocks()
Gets a list of the extended report blocks carried by this RTCPExtendedReport.- Returns:
- a list of the extended repot blocks carried by this RTCPExtendedReport
-
getSSRC
public int getSSRC()
Gets the synchronization source identifier (SSRC) of the originator of this XR packet.- Returns:
- the synchronization source identifier (SSRC) of the originator of this XR packet
-
getSystemTimeStamp
public long getSystemTimeStamp()
Gets the System time in milliseconds at which this RTCPExtendedReport has been received or sent by the local endpoint.- Returns:
- the System time in milliseconds at which this RTCPExtendedReport has been received or sent by the local endpoint
-
removeReportBlock
public boolean removeReportBlock(RTCPExtendedReport.ReportBlock reportBlock)
Removes an extended report block from this extended report.- Parameters:
reportBlock- the extended report block to remove from this extended report- Returns:
- true if the list of extended report blocks carried by this extended report changed because of the method invocation; otherwise, false
-
setSSRC
public void setSSRC(int ssrc)
Sets the synchronization source identifier (SSRC) of the originator of this XR packet.- Parameters:
ssrc- the synchronization source identifier (SSRC) of the originator of this XR packet
-
setSystemTimeStamp
public void setSystemTimeStamp(long systemTimeStamp)
Sets the System time in milliseconds at which this RTCPExtendedReport has been received or sent by the local endpoint.- Parameters:
systemTimeStamp- the System time in milliseconds at which this RTCPExtendedReport has been received or sent by the local endpoint
-
toString
public String toString()
- Overrides:
toStringin classnet.sf.fmj.media.rtp.util.Packet
-
-