Class SplitParallelSampleBandwidthEstimator
- java.lang.Object
-
- com.google.android.exoplayer2.upstream.experimental.SplitParallelSampleBandwidthEstimator
-
- All Implemented Interfaces:
BandwidthEstimator
@Deprecated public class SplitParallelSampleBandwidthEstimator extends Object implements 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.ABandwidthEstimator
that captures a transfer sample each time a transfer ends. When parallel transfers are happening at the same time, the transferred bytes are aggregated in a single sample.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SplitParallelSampleBandwidthEstimator.Builder
Deprecated.A builder to createSplitParallelSampleBandwidthEstimator
instances.
-
Field Summary
-
Fields inherited from interface com.google.android.exoplayer2.upstream.experimental.BandwidthEstimator
ESTIMATE_NOT_AVAILABLE
-
-
Method Summary
All Methods Instance Methods Concrete 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, orBandwidthEstimator.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 anBandwidthMeter.EventListener
.
-
-
-
Method Detail
-
addEventListener
public void addEventListener(Handler eventHandler, BandwidthMeter.EventListener eventListener)
Deprecated.Description copied from interface:BandwidthEstimator
Adds anBandwidthMeter.EventListener
.- Specified by:
addEventListener
in interfaceBandwidthEstimator
- Parameters:
eventHandler
- A handler for events.eventListener
- A listener of events.
-
removeEventListener
public void removeEventListener(BandwidthMeter.EventListener eventListener)
Deprecated.Description copied from interface:BandwidthEstimator
Removes anBandwidthMeter.EventListener
.- Specified by:
removeEventListener
in interfaceBandwidthEstimator
- Parameters:
eventListener
- The listener to be removed.
-
onTransferInitializing
public void onTransferInitializing(DataSource source)
Deprecated.Description copied from interface:BandwidthEstimator
Called when a transfer is being initialized.- Specified by:
onTransferInitializing
in interfaceBandwidthEstimator
- Parameters:
source
- TheDataSource
performing the transfer.
-
onTransferStart
public void onTransferStart(DataSource source)
Deprecated.Description copied from interface:BandwidthEstimator
Called when a transfer starts.- Specified by:
onTransferStart
in interfaceBandwidthEstimator
- Parameters:
source
- TheDataSource
performing the transfer.
-
onBytesTransferred
public void onBytesTransferred(DataSource source, int bytesTransferred)
Deprecated.Description copied from interface:BandwidthEstimator
Called incrementally during a transfer.- Specified by:
onBytesTransferred
in interfaceBandwidthEstimator
- Parameters:
source
- TheDataSource
performing the transfer.bytesTransferred
- The number of bytes transferred since the previous call to this method
-
onTransferEnd
public void onTransferEnd(DataSource source)
Deprecated.Description copied from interface:BandwidthEstimator
Called when a transfer ends.- Specified by:
onTransferEnd
in interfaceBandwidthEstimator
- Parameters:
source
- TheDataSource
performing the transfer.
-
getBandwidthEstimate
public long getBandwidthEstimate()
Deprecated.Description copied from interface:BandwidthEstimator
Returns the bandwidth estimate in bits per second, orBandwidthEstimator.ESTIMATE_NOT_AVAILABLE
if there is no estimate available yet.- Specified by:
getBandwidthEstimate
in interfaceBandwidthEstimator
-
onNetworkTypeChange
public void onNetworkTypeChange(long newBandwidthEstimate)
Deprecated.Description copied from interface:BandwidthEstimator
Notifies this estimator that a network change has been detected.- Specified by:
onNetworkTypeChange
in interfaceBandwidthEstimator
- Parameters:
newBandwidthEstimate
- The new initial bandwidth estimate based on network type.
-
-