Class StatisticsEngine
- java.lang.Object
-
- org.jitsi.impl.neomedia.transform.SinglePacketTransformer
-
- org.jitsi.impl.neomedia.transform.rtcp.StatisticsEngine
-
- All Implemented Interfaces:
PacketTransformer,TransformEngine
public class StatisticsEngine extends SinglePacketTransformer implements TransformEngine
Implements a TransformEngine monitors the incoming and outgoing RTCP packets, logs and stores statistical data about an associated MediaStream.- Author:
- Damian Minkov, Lyubomir Marinov, Boris Grozev
-
-
Field Summary
Fields Modifier and Type Field Description static StringRTP_STAT_PREFIXThe RTP statistics prefix we use for every log.
-
Constructor Summary
Constructors Constructor Description StatisticsEngine(MediaStreamImpl stream)Creates Statistic engine.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAvgInterArrivalJitter()Gets the average value of the jitter reported in RTCP packets, in RTP timestamp units.longgetMaxInterArrivalJitter()The minimum inter arrival jitter value we have reported.longgetMinInterArrivalJitter()The maximum inter arrival jitter value we have reported.PacketTransformergetRTCPTransformer()Returns a reference to this class since it is performing RTP transformations in here.PacketTransformergetRTPTransformer()Always returns null since this engine does not require any RTP transformations.RawPacketreverseTransform(RawPacket pkt)Parses incoming RTCP packets and notifies theMediaStreamStatsof this instance about the reception of packets with known types (currently these are RR, SR, XR, REMB, NACK).RawPackettransform(RawPacket pkt)Transfers RTCP sender report feedback as new information about the download stream for the MediaStreamStats.-
Methods inherited from class org.jitsi.impl.neomedia.transform.SinglePacketTransformer
close, reverseTransform, transform
-
-
-
-
Field Detail
-
RTP_STAT_PREFIX
public static final String RTP_STAT_PREFIX
The RTP statistics prefix we use for every log. Simplifies parsing and searching for statistics info in log files.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StatisticsEngine
public StatisticsEngine(MediaStreamImpl stream)
Creates Statistic engine.- Parameters:
stream- the stream creating us.
-
-
Method Detail
-
getMaxInterArrivalJitter
public long getMaxInterArrivalJitter()
The minimum inter arrival jitter value we have reported.- Returns:
- minimum inter arrival jitter value we have reported.
-
getAvgInterArrivalJitter
public double getAvgInterArrivalJitter()
Gets the average value of the jitter reported in RTCP packets, in RTP timestamp units.
-
getMinInterArrivalJitter
public long getMinInterArrivalJitter()
The maximum inter arrival jitter value we have reported.- Returns:
- maximum inter arrival jitter value we have reported.
-
getRTCPTransformer
public PacketTransformer getRTCPTransformer()
Returns a reference to this class since it is performing RTP transformations in here.- Specified by:
getRTCPTransformerin interfaceTransformEngine- Returns:
- a reference to this instance of the StatisticsEngine.
-
getRTPTransformer
public PacketTransformer getRTPTransformer()
Always returns null since this engine does not require any RTP transformations.- Specified by:
getRTPTransformerin interfaceTransformEngine- Returns:
- null since this engine does not require any RTP transformations.
-
reverseTransform
public RawPacket reverseTransform(RawPacket pkt)
Parses incoming RTCP packets and notifies theMediaStreamStatsof this instance about the reception of packets with known types (currently these are RR, SR, XR, REMB, NACK).- Specified by:
reverseTransformin classSinglePacketTransformer- Parameters:
pkt- the packet to reverse-transform- Returns:
- the packet which is the result of the reverse-transform
-
transform
public RawPacket transform(RawPacket pkt)
Transfers RTCP sender report feedback as new information about the download stream for the MediaStreamStats. Finds the info needed for statistics in the packet and stores it, then returns the same packet as StatisticsEngine is not modifying it.- Specified by:
transformin classSinglePacketTransformer- Parameters:
pkt- the packet to transform- Returns:
- the packet which is the result of the transform
-
-