docs/doc/reference/com/google/android/exoplayer2/upstream/experimental/BandwidthEstimator.html
Package com.google.android.exoplayer2.upstream.experimental
CombinedParallelSampleBandwidthEstimator, SplitParallelSampleBandwidthEstimator[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceBandwidthEstimator
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
The interface for different bandwidth estimation strategies.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static long | ESTIMATE_NOT_AVAILABLE |
Deprecated.
|
All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | addEventListener(Handler eventHandler, BandwidthMeter.EventListener eventListener) |
Deprecated.
Adds an BandwidthMeter.EventListener.
|
| long | getBandwidthEstimate() |
Deprecated.
Returns the bandwidth estimate in bits per second, or ESTIMATE_NOT_AVAILABLE if there is no estimate available yet.
|
| void | onBytesTransferred(DataSource source, int bytesTransferred) |
Deprecated.
Called incrementally during a transfer.
|
| void | onNetworkTypeChange(long newBandwidthEstimate) |
Deprecated.
Notifies this estimator that a network change has been detected.
|
| void | onTransferEnd(DataSource source) |
Deprecated.
Called when a transfer ends.
|
| void | onTransferInitializing(DataSource source) |
Deprecated.
Called when a transfer is being initialized.
|
| void | onTransferStart(DataSource source) |
Deprecated.
Called when a transfer starts.
|
| void | removeEventListener(BandwidthMeter.EventListener eventListener) |
Deprecated.
Removes an BandwidthMeter.EventListener.
|
-
static final long ESTIMATE_NOT_AVAILABLE
Deprecated. See Also:Constant Field Values
-
void addEventListener([Handler](https://developer.android.com/reference/android/os/Handler.html "class or interface in android.os")eventHandler,[BandwidthMeter.EventListener](../BandwidthMeter.EventListener.html "interface in com.google.android.exoplayer2.upstream")eventListener)
Deprecated.
Adds an BandwidthMeter.EventListener.
Parameters:eventHandler - A handler for events.eventListener - A listener of events.
-
void removeEventListener([BandwidthMeter.EventListener](../BandwidthMeter.EventListener.html "interface in com.google.android.exoplayer2.upstream")eventListener)
Deprecated.
Removes an BandwidthMeter.EventListener.
Parameters:eventListener - The listener to be removed.
-
void onTransferInitializing([DataSource](../DataSource.html "interface in com.google.android.exoplayer2.upstream")source)
Deprecated.
Called when a transfer is being initialized.
Parameters:source - The DataSource performing the transfer.
-
void onTransferStart([DataSource](../DataSource.html "interface in com.google.android.exoplayer2.upstream")source)
Deprecated.
Called when a transfer starts.
Parameters:source - The DataSource performing the transfer.
-
void onBytesTransferred([DataSource](../DataSource.html "interface in com.google.android.exoplayer2.upstream")source,
int bytesTransferred)
Deprecated.
Called incrementally during a transfer.
Parameters:source - The DataSource performing the transfer.bytesTransferred - The number of bytes transferred since the previous call to this method
-
void onTransferEnd([DataSource](../DataSource.html "interface in com.google.android.exoplayer2.upstream")source)
Deprecated.
Called when a transfer ends.
Parameters:source - The DataSource performing the transfer.
-
long getBandwidthEstimate()
Deprecated.
Returns the bandwidth estimate in bits per second, or ESTIMATE_NOT_AVAILABLE if there is no estimate available yet.
-
void onNetworkTypeChange(long newBandwidthEstimate)
Deprecated.
Notifies this estimator that a network change has been detected.
Parameters:newBandwidthEstimate - The new initial bandwidth estimate based on network type.