Package org.jitsi.service.neomedia.rtp
Class RTCPExtendedReport.VoIPMetricsReportBlock
- java.lang.Object
-
- org.jitsi.service.neomedia.rtp.RTCPExtendedReport.ReportBlock
-
- org.jitsi.service.neomedia.rtp.RTCPExtendedReport.VoIPMetricsReportBlock
-
- Enclosing class:
- RTCPExtendedReport
public static class RTCPExtendedReport.VoIPMetricsReportBlock extends RTCPExtendedReport.ReportBlock
Implements "VoIP Metrics Report Block" i.e. an extended report block which provides metrics for monitoring voice over IP (VoIP) calls.- Author:
- Lyubomir Marinov
-
-
Field Summary
Fields Modifier and Type Field Description static byteADAPTIVE_JITTER_BUFFER_ADAPTIVEThe jitter buffer size is being dynamically adjusted to deal with varying levels of jitter.static byteDISABLED_PACKET_LOSS_CONCEALMENTSilence is being inserted in place of lost packets.static byteENHANCED_PACKET_LOSS_CONCEALMENTAn enhanced interpolation algorithm is being used; algorithms of this type are able to conceal high packet loss rates effectively.static byteNON_ADAPTIVE_JITTER_BUFFER_ADAPTIVEThe jitter buffer size is maintained at a fixed level.static byteRESERVED_JITTER_BUFFER_ADAPTIVEstatic StringSDP_PARAMETERstatic byteSTANDARD_PACKET_LOSS_CONCEALMENTA simple replay or interpolation algorithm is being used to fill-in the missing packet; this approach is typically able to conceal isolated lost packets at low packet loss rates.static byteUNKNOWN_JITTER_BUFFER_ADAPTIVEstatic byteUNSPECIFIED_PACKET_LOSS_CONCEALMENTNo information is available concerning the use of packet loss concealment (PLC); however, for some codecs this may be inferred.static shortVOIP_METRICS_REPORT_BLOCK_TYPE-
Fields inherited from class org.jitsi.service.neomedia.rtp.RTCPExtendedReport.ReportBlock
blockType
-
-
Constructor Summary
Constructors Constructor Description VoIPMetricsReportBlock()Initializes a new VoIPMetricsReportBlock instance.VoIPMetricsReportBlock(int blockLength, DataInputStream datainputstream)Initializes a new VoIPMetricsReportBlock instance by deserializing/reading a binary representation from a DataInputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassemble(DataOutputStream dataoutputstream)Serializes/writes the binary representation of this ReportBlock into a specific DataOutputStream.intcalcLength()Computes the length in bytes of this ReportBlock, including the header and any padding.shortgetBurstDensity()Gets the fraction of RTP data packets within burst periods since the beginning of reception that were either lost or discarded.intgetBurstDuration()shortgetDiscardRate()Gets the fraction of RTP data packets from the source that have been discarded since the beginning of reception, due to late or early arrival, under-run or overflow at the receiving jitter buffer.intgetEndSystemDelay()bytegetExtRFactor()shortgetGapDensity()Get the fraction of RTP data packets within inter-burst gaps since the beginning of reception that were either lost or discarded.intgetGapDuration()shortgetGMin()intgetJitterBufferAbsoluteMaximumDelay()bytegetJitterBufferAdaptive()Gets whether the jitter buffer is adaptive.intgetJitterBufferMaximumDelay()intgetJitterBufferNominalDelay()bytegetJitterBufferRate()Gets the implementation specific adjustment rate of a jitter buffer in adaptive mode.shortgetLossRate()Gets the fraction of RTP data packets from the source lost since the beginning of reception.bytegetMosCq()bytegetMosLq()bytegetNoiseLevel()bytegetPacketLossConcealment()Gets the type of packet loss concealment (PLC).bytegetResidualEchoReturnLoss()bytegetRFactor()intgetRoundTripDelay()bytegetSignalLevel()intgetSourceSSRC()Gets the synchronization source identifier (SSRC) of the RTP data packet source being reported upon by this report block.voidsetBurstDensity(short burstDensity)Sets the fraction of RTP data packets within burst periods since the beginning of reception that were either lost or discarded.voidsetBurstDuration(int burstDuration)voidsetDiscardRate(short discardRate)Sets the fraction of RTP data packets from the source that have been discarded since the beginning of reception, due to late or early arrival, under-run or overflow at the receiving jitter buffer.voidsetEndSystemDelay(int endSystemDelay)voidsetExtRFactor(byte extRFactor)voidsetGapDensity(short gapDensity)Sets the fraction of RTP data packets within inter-burst gaps since the beginning of reception that were either lost or discarded.voidsetGapDuration(int gapDuration)voidsetGMin(short gMin)voidsetJitterBufferAbsoluteMaximumDelay(int jitterBufferAbsoluteMaximumDelay)voidsetJitterBufferAdaptive(byte jitterBufferAdaptive)Sets whether the jitter buffer is adaptive.voidsetJitterBufferMaximumDelay(int jitterBufferMaximumDelay)voidsetJitterBufferNominalDelay(int jitterBufferNominalDelay)voidsetJitterBufferRate(byte jitterBufferRate)Sets the implementation specific adjustment rate of a jitter buffer in adaptive mode.voidsetLossRate(short lossRate)Sets the fraction of RTP data packets from the source lost since the beginning of reception.voidsetMosCq(byte mosCq)voidsetMosLq(byte mosLq)voidsetNoiseLevel(byte noiseLevel)voidsetPacketLossConcealment(byte packetLossConcealment)Sets the type of packet loss concealment (PLC).voidsetResidualEchoReturnLoss(byte residualEchoReturnLoss)voidsetRFactor(byte rFactor)voidsetRoundTripDelay(int roundTripDelay)voidsetSignalLevel(byte signalLevel)voidsetSourceSSRC(int sourceSSRC)Sets the synchronization source identifier (SSRC) of the RTP data packet source being reported upon by this report block.StringtoString()
-
-
-
Field Detail
-
ADAPTIVE_JITTER_BUFFER_ADAPTIVE
public static final byte ADAPTIVE_JITTER_BUFFER_ADAPTIVE
The jitter buffer size is being dynamically adjusted to deal with varying levels of jitter.- See Also:
- Constant Field Values
-
DISABLED_PACKET_LOSS_CONCEALMENT
public static final byte DISABLED_PACKET_LOSS_CONCEALMENT
Silence is being inserted in place of lost packets.- See Also:
- Constant Field Values
-
ENHANCED_PACKET_LOSS_CONCEALMENT
public static final byte ENHANCED_PACKET_LOSS_CONCEALMENT
An enhanced interpolation algorithm is being used; algorithms of this type are able to conceal high packet loss rates effectively.- See Also:
- Constant Field Values
-
NON_ADAPTIVE_JITTER_BUFFER_ADAPTIVE
public static final byte NON_ADAPTIVE_JITTER_BUFFER_ADAPTIVE
The jitter buffer size is maintained at a fixed level.- See Also:
- Constant Field Values
-
RESERVED_JITTER_BUFFER_ADAPTIVE
public static final byte RESERVED_JITTER_BUFFER_ADAPTIVE
- See Also:
- Constant Field Values
-
SDP_PARAMETER
public static final String SDP_PARAMETER
- See Also:
- Constant Field Values
-
STANDARD_PACKET_LOSS_CONCEALMENT
public static final byte STANDARD_PACKET_LOSS_CONCEALMENT
A simple replay or interpolation algorithm is being used to fill-in the missing packet; this approach is typically able to conceal isolated lost packets at low packet loss rates.- See Also:
- Constant Field Values
-
UNKNOWN_JITTER_BUFFER_ADAPTIVE
public static final byte UNKNOWN_JITTER_BUFFER_ADAPTIVE
- See Also:
- Constant Field Values
-
UNSPECIFIED_PACKET_LOSS_CONCEALMENT
public static final byte UNSPECIFIED_PACKET_LOSS_CONCEALMENT
No information is available concerning the use of packet loss concealment (PLC); however, for some codecs this may be inferred.- See Also:
- Constant Field Values
-
VOIP_METRICS_REPORT_BLOCK_TYPE
public static final short VOIP_METRICS_REPORT_BLOCK_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VoIPMetricsReportBlock
public VoIPMetricsReportBlock()
Initializes a new VoIPMetricsReportBlock instance.
-
VoIPMetricsReportBlock
public VoIPMetricsReportBlock(int blockLength, DataInputStream datainputstream) throws IOExceptionInitializes a new VoIPMetricsReportBlock instance by deserializing/reading a binary representation from a DataInputStream.- Parameters:
blockLength- the length of the extended report block to read, not including the header, in bytes.datainputstream- the binary representation from which the new instance is to be initialized. The datainputstream is asumed to contain type-specific block contents without extended report block header i.e. no block type (BT), type-specific, and block length fields will be read from datainputstream.- 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 VoIPMetricsReportBlock instance
-
-
Method Detail
-
assemble
protected void assemble(DataOutputStream dataoutputstream) throws IOException
Serializes/writes the binary representation of this ReportBlock into a specific DataOutputStream.- Specified by:
assemblein classRTCPExtendedReport.ReportBlock- Parameters:
dataoutputstream- the DataOutputStream into which the binary representation of this ReportBlock is to be serialized/written.- Throws:
IOException- if an input/output error occurs during the serialization/writing of the binary representation of this ReportBlock
-
calcLength
public int calcLength()
Computes the length in bytes of this ReportBlock, including the header and any padding.The implementation of ReportBlock returns the length in bytes of the header of an extended report block i.e. 4. The implementation is provided as a convenience because RFC 3611 defines that the type-specific block contents of an extended report block may be zero bits long if the block type definition permits. As defined by RFC 3611, a VoIP Metrics Report Block has a length in bytes equal to 36, including the extended report block header.
- Overrides:
calcLengthin classRTCPExtendedReport.ReportBlock- Returns:
- the length in bytes of this ReportBlock, including the header and any padding.
-
getBurstDensity
public short getBurstDensity()
Gets the fraction of RTP data packets within burst periods since the beginning of reception that were either lost or discarded.- Returns:
- the fraction of RTP data packets within burst periods since the beginning of reception that were either lost or discarded
-
getBurstDuration
public int getBurstDuration()
-
getDiscardRate
public short getDiscardRate()
Gets the fraction of RTP data packets from the source that have been discarded since the beginning of reception, due to late or early arrival, under-run or overflow at the receiving jitter buffer.- Returns:
- the fraction of RTP data packets from the source that have been discarded since the beginning of reception, due to late or early arrival, under-run or overflow at the receiving jitter buffer
- See Also:
discardRate
-
getEndSystemDelay
public int getEndSystemDelay()
-
getExtRFactor
public byte getExtRFactor()
-
getGapDensity
public short getGapDensity()
Get the fraction of RTP data packets within inter-burst gaps since the beginning of reception that were either lost or discarded.- Returns:
- the fraction of RTP data packets within inter-burst gaps since the beginning of reception that were either lost or discarded
-
getGapDuration
public int getGapDuration()
-
getGMin
public short getGMin()
-
getJitterBufferAbsoluteMaximumDelay
public int getJitterBufferAbsoluteMaximumDelay()
-
getJitterBufferAdaptive
public byte getJitterBufferAdaptive()
Gets whether the jitter buffer is adaptive.
-
getJitterBufferMaximumDelay
public int getJitterBufferMaximumDelay()
-
getJitterBufferNominalDelay
public int getJitterBufferNominalDelay()
-
getJitterBufferRate
public byte getJitterBufferRate()
Gets the implementation specific adjustment rate of a jitter buffer in adaptive mode.- Returns:
- the implementation specific adjustment rate of a jitter buffer in adaptive mode
-
getLossRate
public short getLossRate()
Gets the fraction of RTP data packets from the source lost since the beginning of reception.- Returns:
- the fraction of RTP data packets from the source lost since the beginning of reception
- See Also:
lossRate
-
getMosCq
public byte getMosCq()
-
getMosLq
public byte getMosLq()
-
getNoiseLevel
public byte getNoiseLevel()
-
getPacketLossConcealment
public byte getPacketLossConcealment()
Gets the type of packet loss concealment (PLC).
-
getResidualEchoReturnLoss
public byte getResidualEchoReturnLoss()
-
getRFactor
public byte getRFactor()
-
getRoundTripDelay
public int getRoundTripDelay()
-
getSignalLevel
public byte getSignalLevel()
-
getSourceSSRC
public int getSourceSSRC()
Gets the synchronization source identifier (SSRC) of the RTP data packet source being reported upon by this report block.- Returns:
- the synchronization source identifier (SSRC) of the RTP data packet source being reported upon by this report block
-
setBurstDensity
public void setBurstDensity(short burstDensity)
Sets the fraction of RTP data packets within burst periods since the beginning of reception that were either lost or discarded.- Parameters:
burstDensity- the fraction of RTP data packets within burst periods since the beginning of reception that were either lost or discarded
-
setBurstDuration
public void setBurstDuration(int burstDuration)
-
setDiscardRate
public void setDiscardRate(short discardRate)
Sets the fraction of RTP data packets from the source that have been discarded since the beginning of reception, due to late or early arrival, under-run or overflow at the receiving jitter buffer.- Parameters:
discardRate- the fraction of RTP data packets from the source that have been discarded since the beginning of reception, due to late or early arrival, under-run or overflow at the receiving jitter buffer- See Also:
discardRate
-
setEndSystemDelay
public void setEndSystemDelay(int endSystemDelay)
-
setExtRFactor
public void setExtRFactor(byte extRFactor)
-
setGapDensity
public void setGapDensity(short gapDensity)
Sets the fraction of RTP data packets within inter-burst gaps since the beginning of reception that were either lost or discarded.- Parameters:
gapDensity- the fraction of RTP data packets within inter-burst gaps since the beginning of reception that were either lost or discarded
-
setGapDuration
public void setGapDuration(int gapDuration)
-
setGMin
public void setGMin(short gMin)
-
setJitterBufferAbsoluteMaximumDelay
public void setJitterBufferAbsoluteMaximumDelay(int jitterBufferAbsoluteMaximumDelay)
-
setJitterBufferAdaptive
public void setJitterBufferAdaptive(byte jitterBufferAdaptive)
Sets whether the jitter buffer is adaptive.- Parameters:
jitterBufferAdaptive-ADAPTIVE_JITTER_BUFFER_ADAPTIVE,NON_ADAPTIVE_JITTER_BUFFER_ADAPTIVE,RESERVED_JITTER_BUFFER_ADAPTIVE, orUNKNOWN_JITTER_BUFFER_ADAPTIVE- Throws:
IllegalArgumentException- if the specified jitterBufferAdapter is not one of the constants ADAPTIVE_JITTER_BUFFER_ADAPTIVE, NON_ADAPTIVE_JITTER_BUFFER_ADAPTIVE, RESERVED_JITTER_BUFFER_ADAPTIVE, and UNKNOWN_JITTER_BUFFER_ADAPTIVE
-
setJitterBufferMaximumDelay
public void setJitterBufferMaximumDelay(int jitterBufferMaximumDelay)
-
setJitterBufferNominalDelay
public void setJitterBufferNominalDelay(int jitterBufferNominalDelay)
-
setJitterBufferRate
public void setJitterBufferRate(byte jitterBufferRate)
Sets the implementation specific adjustment rate of a jitter buffer in adaptive mode.- Parameters:
jitterBufferRate- the implementation specific adjustment rate of a jitter buffer in adaptive mode
-
setLossRate
public void setLossRate(short lossRate)
Sets the fraction of RTP data packets from the source lost since the beginning of reception.- Parameters:
lossRate- the fraction of RTP data packets from the source lost since the beginning of reception- See Also:
lossRate
-
setMosCq
public void setMosCq(byte mosCq)
-
setMosLq
public void setMosLq(byte mosLq)
-
setNoiseLevel
public void setNoiseLevel(byte noiseLevel)
-
setPacketLossConcealment
public void setPacketLossConcealment(byte packetLossConcealment)
Sets the type of packet loss concealment (PLC).- Parameters:
packetLossConcealment-STANDARD_PACKET_LOSS_CONCEALMENT,ENHANCED_PACKET_LOSS_CONCEALMENT,DISABLED_PACKET_LOSS_CONCEALMENT, orUNSPECIFIED_PACKET_LOSS_CONCEALMENT- Throws:
IllegalArgumentException- if the specified packetLossConcealment is not one of the constants STANDARD_PACKET_LOSS_CONCEALMENT, ENHANCED_PACKET_LOSS_CONCEALMENT, DISABLED_PACKET_LOSS_CONCEALMENT, and UNSPECIFIED_PACKET_LOSS_CONCEALMENT
-
setResidualEchoReturnLoss
public void setResidualEchoReturnLoss(byte residualEchoReturnLoss)
-
setRFactor
public void setRFactor(byte rFactor)
-
setRoundTripDelay
public void setRoundTripDelay(int roundTripDelay)
-
setSignalLevel
public void setSignalLevel(byte signalLevel)
-
setSourceSSRC
public void setSourceSSRC(int sourceSSRC)
Sets the synchronization source identifier (SSRC) of the RTP data packet source being reported upon by this report block.- Parameters:
sourceSSRC- the synchronization source identifier (SSRC) of the RTP data packet source being reported upon by this report block
-
-