Interface BandwidthEstimator
-
- All Known Implementing Classes:
CombinedParallelSampleBandwidthEstimator,SplitParallelSampleBandwidthEstimator
@Deprecated public interface BandwidthEstimator
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.
-
-
Field Summary
Fields Modifier and Type Field Description static longESTIMATE_NOT_AVAILABLEDeprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddEventListener(Handler eventHandler, BandwidthMeter.EventListener eventListener)Deprecated.Adds anBandwidthMeter.EventListener.longgetBandwidthEstimate()Deprecated.Returns the bandwidth estimate in bits per second, orESTIMATE_NOT_AVAILABLEif there is no estimate available yet.voidonBytesTransferred(DataSource source, int bytesTransferred)Deprecated.Called incrementally during a transfer.voidonNetworkTypeChange(long newBandwidthEstimate)Deprecated.Notifies this estimator that a network change has been detected.voidonTransferEnd(DataSource source)Deprecated.Called when a transfer ends.voidonTransferInitializing(DataSource source)Deprecated.Called when a transfer is being initialized.voidonTransferStart(DataSource source)Deprecated.Called when a transfer starts.voidremoveEventListener(BandwidthMeter.EventListener eventListener)Deprecated.Removes anBandwidthMeter.EventListener.
-
-
-
Field Detail
-
ESTIMATE_NOT_AVAILABLE
static final long ESTIMATE_NOT_AVAILABLE
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
addEventListener
void addEventListener(Handler eventHandler, BandwidthMeter.EventListener eventListener)
Deprecated.Adds anBandwidthMeter.EventListener.- Parameters:
eventHandler- A handler for events.eventListener- A listener of events.
-
removeEventListener
void removeEventListener(BandwidthMeter.EventListener eventListener)
Deprecated.Removes anBandwidthMeter.EventListener.- Parameters:
eventListener- The listener to be removed.
-
onTransferInitializing
void onTransferInitializing(DataSource source)
Deprecated.Called when a transfer is being initialized.- Parameters:
source- TheDataSourceperforming the transfer.
-
onTransferStart
void onTransferStart(DataSource source)
Deprecated.Called when a transfer starts.- Parameters:
source- TheDataSourceperforming the transfer.
-
onBytesTransferred
void onBytesTransferred(DataSource source, int bytesTransferred)
Deprecated.Called incrementally during a transfer.- Parameters:
source- TheDataSourceperforming the transfer.bytesTransferred- The number of bytes transferred since the previous call to this method
-
onTransferEnd
void onTransferEnd(DataSource source)
Deprecated.Called when a transfer ends.- Parameters:
source- TheDataSourceperforming the transfer.
-
getBandwidthEstimate
long getBandwidthEstimate()
Deprecated.Returns the bandwidth estimate in bits per second, orESTIMATE_NOT_AVAILABLEif there is no estimate available yet.
-
onNetworkTypeChange
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.
-
-