Class AbstractTrackStats

    • Field Detail

      • bytes

        protected final AtomicLong bytes
        The total number of bytes.
      • packets

        protected final AtomicLong packets
        The total number of RTP packets. This excludes RTCP packets, because the value is used to calculate the number of lost RTP packets.
      • bytesRetransmitted

        protected final AtomicLong bytesRetransmitted
        Number of bytes retransmitted.
      • bytesNotRetransmitted

        protected final AtomicLong bytesNotRetransmitted
        Number of bytes for packets which were requested and found in the cache, but were intentionally not retransmitted.
      • packetsRetransmitted

        protected final AtomicLong packetsRetransmitted
        Number of packets retransmitted.
      • packetsNotRetransmitted

        protected final AtomicLong packetsNotRetransmitted
        Number of packets which were requested and found in the cache, but were intentionally not retransmitted.
      • packetsMissingFromCache

        protected final AtomicLong packetsMissingFromCache
        The number of packets for which retransmission was requested, but they were missing from the cache.
      • bitrate

        protected org.jitsi.utils.stats.RateStatistics bitrate
        The bitrate.
      • packetRate

        protected org.jitsi.utils.stats.RateStatistics packetRate
        The packet rate.
    • Method Detail

      • packetProcessed

        protected void packetProcessed​(int length,
                                       long now,
                                       boolean rtp)
        Notifies this instance that a packet with a given length was processed (i.e. sent or received).
        Parameters:
        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.
      • getJitter

        public double getJitter()
        Specified by:
        getJitter in interface TrackStats
        Returns:
        the jitter in milliseconds.
      • getRtt

        public long getRtt()
        Specified by:
        getRtt in interface TrackStats
        Returns:
        the round trip time in milliseconds.
      • getBytes

        public long getBytes()
        Specified by:
        getBytes in interface TrackStats
        Returns:
        the total number of bytes.
      • getPackets

        public long getPackets()
        Specified by:
        getPackets in interface TrackStats
        Returns:
        the total number of packets.
      • getBitrate

        public long getBitrate()
        Specified by:
        getBitrate in interface TrackStats
        Returns:
        the current bitrate in bits per second.
      • getPacketRate

        public long getPacketRate()
        Specified by:
        getPacketRate in interface TrackStats
        Returns:
        the current packet rate in packets per second.
      • getCurrentBytes

        public long getCurrentBytes()
        Specified by:
        getCurrentBytes in interface TrackStats
        Returns:
        the number of bytes in the last interval.
      • getCurrentPackets

        public long getCurrentPackets()
        Specified by:
        getCurrentPackets in interface TrackStats
        Returns:
        the number of packets in the last interval.
      • setJitter

        protected void setJitter​(double jitter)
        Sets the last jitter that was sent/received.
        Parameters:
        jitter - the new value to set on this instance as the last sent/received jitter (in milliseconds).
      • setRtt

        protected void setRtt​(long rtt)
        Sets rtt to a specific value in milliseconds.
      • getBytesRetransmitted

        public long getBytesRetransmitted()
        Gets the number of bytes retransmitted.
        Specified by:
        getBytesRetransmitted in interface TrackStats
        Returns:
        the number of bytes retransmitted.
      • getBytesNotRetransmitted

        public long getBytesNotRetransmitted()
        Gets the number of bytes for packets which were requested and found in the cache, but were intentionally not retransmitted.
        Specified by:
        getBytesNotRetransmitted in interface TrackStats
        Returns:
        the number of bytes for packets which were requested and found in the cache, but were intentionally not retransmitted.
      • getPacketsRetransmitted

        public long getPacketsRetransmitted()
        Gets the number of packets retransmitted.
        Specified by:
        getPacketsRetransmitted in interface TrackStats
        Returns:
        the number of packets retransmitted.
      • getPacketsNotRetransmitted

        public long getPacketsNotRetransmitted()
        Gets the number of packets which were requested and found in the cache, but were intentionally not retransmitted.
        Specified by:
        getPacketsNotRetransmitted in interface TrackStats
        Returns:
        the number of packets which were requested and found in the cache, but were intentionally not retransmitted.
      • getPacketsMissingFromCache

        public long getPacketsMissingFromCache()
        Gets the number of packets for which retransmission was requested, but they were missing from the cache.
        Specified by:
        getPacketsMissingFromCache in interface TrackStats
        Returns:
        the number of packets for which retransmission was requested, but they were missing from the cache.
      • rtpPacketRetransmitted

        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).
        Parameters:
        length - the length in bytes of the packet.
      • rtpPacketNotRetransmitted

        protected void rtpPacketNotRetransmitted​(long length)
        Notifies this instance that an RTP packet with a given length was retransmitted.
        Parameters:
        length - the length in bytes of the packet.