Class BandwidthEstimatorImpl
- java.lang.Object
-
- org.jitsi.service.neomedia.rtp.RTCPReportAdapter
-
- org.jitsi.impl.neomedia.rtp.sendsidebandwidthestimation.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jitsi.service.neomedia.rtp.BandwidthEstimator
BandwidthEstimator.Listener, BandwidthEstimator.Statistics
-
-
Field Summary
Fields Modifier and Type Field Description static StringSTART_BITRATE_BPS_PNAMEThe system property name of the initial value of the estimation, in bits per second.
-
Constructor Summary
Constructors Constructor Description BandwidthEstimatorImpl(MediaStreamImpl stream)Initializes a new instance which is to belong to a particularMediaStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(BandwidthEstimator.Listener listener)Adds a listener to be notified about changes to the bandwidth estimation.longgetLatestEstimate()intgetLatestFractionLoss()longgetLatestREMB()org.jitsi.impl.neomedia.rtp.sendsidebandwidthestimation.SendSideBandwidthEstimation.StatisticsImplgetStatistics()longgetTimeUntilNextRun()voidremoveListener(BandwidthEstimator.Listener listener)Removes a listener.voidrtcpReportReceived(net.sf.fmj.media.rtp.RTCPReport report)Notifies this listener that a specific RTCP SR or RR was received by the local endpoint.voidrun()voidupdateReceiverEstimate(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.-
Methods inherited from class org.jitsi.service.neomedia.rtp.RTCPReportAdapter
rtcpExtendedReportReceived, rtcpExtendedReportSent, rtcpReportSent
-
-
-
-
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 particularMediaStream.- Parameters:
stream- theMediaStream.
-
-
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:
rtcpReportReceivedin interfaceRTCPReportListener- Overrides:
rtcpReportReceivedin classRTCPReportAdapter- Parameters:
report- the received RTCP SR or RR
-
addListener
public void addListener(BandwidthEstimator.Listener listener)
Description copied from interface:BandwidthEstimatorAdds a listener to be notified about changes to the bandwidth estimation.- Specified by:
addListenerin interfaceBandwidthEstimator
-
removeListener
public void removeListener(BandwidthEstimator.Listener listener)
Description copied from interface:BandwidthEstimatorRemoves a listener.- Specified by:
removeListenerin interfaceBandwidthEstimator
-
getLatestEstimate
public long getLatestEstimate()
- Specified by:
getLatestEstimatein interfaceBandwidthEstimator- Returns:
- the latest estimate.
-
getLatestREMB
public long getLatestREMB()
- Specified by:
getLatestREMBin interfaceBandwidthEstimator- 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:
updateReceiverEstimatein interfaceBandwidthEstimator
-
getLatestFractionLoss
public int getLatestFractionLoss()
- Specified by:
getLatestFractionLossin interfaceBandwidthEstimator- 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:
getStatisticsin interfaceBandwidthEstimator- Returns:
- the send-side bwe-specific statistics.
-
getTimeUntilNextRun
public long getTimeUntilNextRun()
- Specified by:
getTimeUntilNextRunin interfaceorg.jitsi.utils.concurrent.RecurringRunnable
-
-