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 long
ESTIMATE_NOT_AVAILABLE
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addEventListener(Handler eventHandler, BandwidthMeter.EventListener eventListener)
Deprecated.Adds anBandwidthMeter.EventListener
.long
getBandwidthEstimate()
Deprecated.Returns the bandwidth estimate in bits per second, orESTIMATE_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 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
- TheDataSource
performing the transfer.
-
onTransferStart
void onTransferStart(DataSource source)
Deprecated.Called when a transfer starts.- Parameters:
source
- TheDataSource
performing the transfer.
-
onBytesTransferred
void onBytesTransferred(DataSource source, int bytesTransferred)
Deprecated.Called incrementally during a transfer.- Parameters:
source
- TheDataSource
performing 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
- TheDataSource
performing the transfer.
-
getBandwidthEstimate
long getBandwidthEstimate()
Deprecated.Returns the bandwidth estimate in bits per second, orESTIMATE_NOT_AVAILABLE
if 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.
-
-