public class BandwidthEstimatorImpl extends RTCPReportAdapter implements BandwidthEstimator, RecurringRunnable
BandwidthEstimator.Listener, BandwidthEstimator.Statistics
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
START_BITRATE_BPS_PNAME
The system property name of the initial value of the estimation, in bits
per second.
|
Constructor and Description |
---|
BandwidthEstimatorImpl(MediaStreamImpl stream)
Initializes a new instance which is to belong to a particular
MediaStream . |
Modifier and Type | Method and Description |
---|---|
void |
addListener(BandwidthEstimator.Listener listener)
Adds a listener to be notified about changes to the bandwidth estimation.
|
long |
getLatestEstimate() |
int |
getLatestFractionLoss() |
long |
getLatestREMB() |
SendSideBandwidthEstimation.StatisticsImpl |
getStatistics() |
long |
getTimeUntilNextRun()
Returns the number of milliseconds until this instance wants a worker
thread to call
Runnable.run() . |
void |
removeListener(BandwidthEstimator.Listener listener)
Removes a listener.
|
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.
|
void |
run() |
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.
|
rtcpExtendedReportReceived, rtcpExtendedReportSent, rtcpReportSent
public static final java.lang.String START_BITRATE_BPS_PNAME
public BandwidthEstimatorImpl(MediaStreamImpl stream)
MediaStream
.stream
- the MediaStream
.public void rtcpReportReceived(net.sf.fmj.media.rtp.RTCPReport report)
rtcpReportReceived
in interface RTCPReportListener
rtcpReportReceived
in class RTCPReportAdapter
report
- the received RTCP SR or RRpublic void addListener(BandwidthEstimator.Listener listener)
BandwidthEstimator
addListener
in interface BandwidthEstimator
public void removeListener(BandwidthEstimator.Listener listener)
BandwidthEstimator
removeListener
in interface BandwidthEstimator
public long getLatestEstimate()
getLatestEstimate
in interface BandwidthEstimator
public long getLatestREMB()
getLatestREMB
in interface BandwidthEstimator
public void updateReceiverEstimate(long bandwidth)
updateReceiverEstimate
in interface BandwidthEstimator
public int getLatestFractionLoss()
getLatestFractionLoss
in interface BandwidthEstimator
BandwidthEstimator
. The value is between 0 and 256 (corresponding
to 0% and 100% respectively).public SendSideBandwidthEstimation.StatisticsImpl getStatistics()
getStatistics
in interface BandwidthEstimator
public long getTimeUntilNextRun()
RecurringRunnable
Runnable.run()
. The method is called on the same
worker thread as Process will be called on.getTimeUntilNextRun
in interface RecurringRunnable
Runnable.run()
public void run()
run
in interface java.lang.Runnable
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.