Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.transform.rtcp
Class StatisticsEngine

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.transform.rtcp.StatisticsEngine
All Implemented Interfaces:
PacketTransformer, TransformEngine

public class StatisticsEngine
extends Object
implements TransformEngine, PacketTransformer

Engine which don't transform packets, just listens for outgoing RTCP Packets and logs and stores statistical data for the stream.

Author:
Damian Minkov

Field Summary
static String RTP_STAT_PREFIX
          The rtp statistics prefix we use for every log.
 
Constructor Summary
StatisticsEngine(MediaStreamImpl stream)
          Creates Statistic engine.
 
Method Summary
 void close()
          Close the transformer and underlying transform engine.
 long getLost()
          Number of lost packets reported.
 long getMaxInterArrivalJitter()
          The minimum inter arrival jitter value we have reported.
 long getMinInterArrivalJitter()
          The maximum inter arrival jitter value we have reported.
 PacketTransformer getRTCPTransformer()
          Returns a reference to this class since it is performing RTP transformations in here.
 PacketTransformer getRTPTransformer()
          Always returns null since this engine does not require any RTP transformations.
 RawPacket reverseTransform(RawPacket pkt)
          Transfers RTCP sender report feedback as new information about the upload stream for the MediaStreamStats.
 RawPacket transform(RawPacket pkt)
          Transfers RTCP sender report feedback as new information about the download stream for the MediaStreamStats.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

close

public void close()
Close the transformer and underlying transform engine. Nothing to do here.

Specified by:
close in interface PacketTransformer

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 we are not modifying it.

Specified by:
transform in interface PacketTransformer
Parameters:
pkt - the packet
Returns:
the packet

reverseTransform

public RawPacket reverseTransform(RawPacket pkt)
Transfers RTCP sender report feedback as new information about the upload stream for the MediaStreamStats. Returns the packet as we are listening just for sending packages.

Specified by:
reverseTransform in interface PacketTransformer
Parameters:
pkt - the packet without any change.
Returns:
the packet without any change.

getRTPTransformer

public PacketTransformer getRTPTransformer()
Always returns null since this engine does not require any RTP transformations.

Specified by:
getRTPTransformer in interface TransformEngine
Returns:
null since this engine does not require any RTP transformations.

getRTCPTransformer

public PacketTransformer getRTCPTransformer()
Returns a reference to this class since it is performing RTP transformations in here.

Specified by:
getRTCPTransformer in interface TransformEngine
Returns:
a reference to this instance of the StatisticsEngine.

getMaxInterArrivalJitter

public long getMaxInterArrivalJitter()
The minimum inter arrival jitter value we have reported.

Returns:
minimum inter arrival jitter value we have reported.

getMinInterArrivalJitter

public long getMinInterArrivalJitter()
The maximum inter arrival jitter value we have reported.

Returns:
maximum inter arrival jitter value we have reported.

getLost

public long getLost()
Number of lost packets reported.

Returns:
number of lost packets reported.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.