public abstract class AbstractTrackStats extends java.lang.Object implements TrackStats
Modifier and Type | Field and Description |
---|---|
protected org.ice4j.util.RateStatistics |
bitrate
The bitrate.
|
protected java.util.concurrent.atomic.AtomicLong |
bytes
The total number of bytes.
|
protected java.util.concurrent.atomic.AtomicLong |
bytesNotRetransmitted
Number of bytes for packets which were requested and found in the
cache, but were intentionally not retransmitted.
|
protected java.util.concurrent.atomic.AtomicLong |
bytesRetransmitted
Number of bytes retransmitted.
|
protected org.ice4j.util.RateStatistics |
packetRate
The packet rate.
|
protected java.util.concurrent.atomic.AtomicLong |
packets
The total number of RTP packets.
|
protected java.util.concurrent.atomic.AtomicLong |
packetsMissingFromCache
The number of packets for which retransmission was requested, but
they were missing from the cache.
|
protected java.util.concurrent.atomic.AtomicLong |
packetsNotRetransmitted
Number of packets which were requested and found in the cache, but
were intentionally not retransmitted.
|
protected java.util.concurrent.atomic.AtomicLong |
packetsRetransmitted
Number of packets retransmitted.
|
JITTER_UNSET
Constructor and Description |
---|
AbstractTrackStats(int interval,
long ssrc)
Initializes a new
AbstractTrackStats instance. |
Modifier and Type | Method and Description |
---|---|
long |
getBitrate() |
long |
getBytes() |
long |
getBytesNotRetransmitted()
Gets the number of bytes for packets which were requested and found
in the cache, but were intentionally not retransmitted.
|
long |
getBytesRetransmitted()
Gets the number of bytes retransmitted.
|
long |
getCurrentBytes() |
long |
getCurrentPackets() |
long |
getInterval() |
double |
getJitter() |
long |
getPacketRate() |
long |
getPackets() |
long |
getPacketsMissingFromCache()
Gets the number of packets for which retransmission was requested,
but they were missing from the cache.
|
long |
getPacketsNotRetransmitted()
Gets the number of packets which were requested and found in the
cache, but were intentionally not retransmitted.
|
long |
getPacketsRetransmitted()
Gets the number of packets retransmitted.
|
long |
getRtt() |
long |
getSSRC() |
protected void |
packetProcessed(int length,
long now,
boolean rtp)
Notifies this instance that a packet with a given length was processed
(i.e.
|
(package private) void |
rtpPacketCacheMiss()
Notifies this instance that the remote endpoint requested retransmission
of a packet, and it was not found in the local cache.
|
protected void |
rtpPacketNotRetransmitted(long length)
Notifies this instance that an RTP packet with a given length was
retransmitted.
|
protected void |
rtpPacketRetransmitted(long length)
Notifies this instance that an RTP packet with a given length was not
retransmitted (that is, the remote endpoint requested it,
and it was found in the local cache, but it was not retransmitted).
|
protected void |
setJitter(double jitter)
Sets the last jitter that was sent/received.
|
protected void |
setRtt(long rtt)
Sets
rtt to a specific value in milliseconds. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLossRate
protected final java.util.concurrent.atomic.AtomicLong bytes
protected final java.util.concurrent.atomic.AtomicLong packets
protected final java.util.concurrent.atomic.AtomicLong bytesRetransmitted
protected final java.util.concurrent.atomic.AtomicLong bytesNotRetransmitted
protected final java.util.concurrent.atomic.AtomicLong packetsRetransmitted
protected final java.util.concurrent.atomic.AtomicLong packetsNotRetransmitted
protected final java.util.concurrent.atomic.AtomicLong packetsMissingFromCache
protected org.ice4j.util.RateStatistics bitrate
protected org.ice4j.util.RateStatistics packetRate
AbstractTrackStats(int interval, long ssrc)
AbstractTrackStats
instance.public long getSSRC()
getSSRC
in interface TrackStats
TrackStats
.protected void packetProcessed(int length, long now, boolean rtp)
length
- the length of the packet.now
- the time at which the packet was processed (passed in order
to avoid calling System.currentTimeMillis()
).rtp
- whether the packet is an RTP or RTCP packet.public double getJitter()
getJitter
in interface TrackStats
public long getRtt()
getRtt
in interface TrackStats
public long getBytes()
getBytes
in interface TrackStats
public long getPackets()
getPackets
in interface TrackStats
public long getBitrate()
getBitrate
in interface TrackStats
public long getPacketRate()
getPacketRate
in interface TrackStats
public long getCurrentBytes()
getCurrentBytes
in interface TrackStats
public long getCurrentPackets()
getCurrentPackets
in interface TrackStats
public long getInterval()
getInterval
in interface TrackStats
TrackStats.getCurrentBytes()
and TrackStats.getCurrentPackets()
operate.protected void setJitter(double jitter)
jitter
- the new value to set on this instance as the last
sent/received jitter (in milliseconds).protected void setRtt(long rtt)
rtt
to a specific value in milliseconds.public long getBytesRetransmitted()
getBytesRetransmitted
in interface TrackStats
public long getBytesNotRetransmitted()
getBytesNotRetransmitted
in interface TrackStats
public long getPacketsRetransmitted()
getPacketsRetransmitted
in interface TrackStats
public long getPacketsNotRetransmitted()
getPacketsNotRetransmitted
in interface TrackStats
public long getPacketsMissingFromCache()
getPacketsMissingFromCache
in interface TrackStats
protected void rtpPacketRetransmitted(long length)
length
- the length in bytes of the packet.protected void rtpPacketNotRetransmitted(long length)
length
- the length in bytes of the packet.void rtpPacketCacheMiss()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.