Class BandwidthEstimatorImpl

  • All Implemented Interfaces:
    Runnable, BandwidthEstimator, RTCPReportListener, org.jitsi.utils.concurrent.RecurringRunnable

    public class BandwidthEstimatorImpl
    extends RTCPReportAdapter
    implements BandwidthEstimator, org.jitsi.utils.concurrent.RecurringRunnable
    Implements part of the send-side bandwidth estimation described in https://tools.ietf.org/html/draft-ietf-rmcat-gcc-01 Heavily based on code from webrtc.org (bitrate_controller_impl.cc, commit ID 7ad9e661f8a035d49d049ccdb87c77ae8ecdfa35).
    Author:
    Boris Grozev, George Politis
    • Field Detail

      • START_BITRATE_BPS_PNAME

        public static final String START_BITRATE_BPS_PNAME
        The system property name of the initial value of the estimation, in bits per second.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BandwidthEstimatorImpl

        public BandwidthEstimatorImpl​(MediaStreamImpl stream)
        Initializes a new instance which is to belong to a particular MediaStream.
        Parameters:
        stream - the MediaStream.
    • Method Detail

      • rtcpReportReceived

        public void rtcpReportReceived​(net.sf.fmj.media.rtp.RTCPReport report)
        Notifies this listener that a specific RTCP SR or RR was received by the local endpoint. bitrate_controller_impl.cc BitrateControllerImpl::OnReceivedRtcpReceiverReport
        Specified by:
        rtcpReportReceived in interface RTCPReportListener
        Overrides:
        rtcpReportReceived in class RTCPReportAdapter
        Parameters:
        report - the received RTCP SR or RR
      • getLatestREMB

        public long getLatestREMB()
        Specified by:
        getLatestREMB in interface BandwidthEstimator
        Returns:
        the latest values of the Receiver Estimated Maximum Bandwidth.
      • updateReceiverEstimate

        public void updateReceiverEstimate​(long bandwidth)
        void SendSideBandwidthEstimation::UpdateReceiverEstimate This is the entry/update point for the estimated bitrate in the REMBPacket or a Delay Based Controller estimated bitrate when the Delay based controller and the loss based controller lives on the send side. see internet draft on "Congestion Control for RTCWEB"
        Specified by:
        updateReceiverEstimate in interface BandwidthEstimator
      • getLatestFractionLoss

        public int getLatestFractionLoss()
        Specified by:
        getLatestFractionLoss in interface BandwidthEstimator
        Returns:
        the latest effective fraction loss calculated by this BandwidthEstimator. The value is between 0 and 256 (corresponding to 0% and 100% respectively).
      • getStatistics

        public org.jitsi.impl.neomedia.rtp.sendsidebandwidthestimation.SendSideBandwidthEstimation.StatisticsImpl getStatistics()
        Specified by:
        getStatistics in interface BandwidthEstimator
        Returns:
        the send-side bwe-specific statistics.
      • getTimeUntilNextRun

        public long getTimeUntilNextRun()
        Specified by:
        getTimeUntilNextRun in interface org.jitsi.utils.concurrent.RecurringRunnable
      • run

        public void run()
        Specified by:
        run in interface Runnable