Class ExponentialWeightedAverageTimeToFirstByteEstimator
- java.lang.Object
-
- com.google.android.exoplayer2.upstream.experimental.ExponentialWeightedAverageTimeToFirstByteEstimator
-
- All Implemented Interfaces:
TimeToFirstByteEstimator
@Deprecated public final class ExponentialWeightedAverageTimeToFirstByteEstimator extends Object implements TimeToFirstByteEstimator
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.Implementation ofTimeToFirstByteEstimatorbased on exponential weighted average.
-
-
Field Summary
Fields Modifier and Type Field Description static doubleDEFAULT_SMOOTHING_FACTORDeprecated.The default smoothing factor.
-
Constructor Summary
Constructors Constructor Description ExponentialWeightedAverageTimeToFirstByteEstimator()Deprecated.Creates an instance using theDEFAULT_SMOOTHING_FACTOR.ExponentialWeightedAverageTimeToFirstByteEstimator(double smoothingFactor)Deprecated.Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longgetTimeToFirstByteEstimateUs()Deprecated.Returns the estimated time to first byte of the response body, in microseconds, orC.TIME_UNSETif no estimate is available.voidonTransferInitializing(DataSpec dataSpec)Deprecated.Called when a transfer is being initialized.voidonTransferStart(DataSpec dataSpec)Deprecated.Called when a transfer starts.voidreset()Deprecated.Resets the estimator.
-
-
-
Field Detail
-
DEFAULT_SMOOTHING_FACTOR
public static final double DEFAULT_SMOOTHING_FACTOR
Deprecated.The default smoothing factor.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExponentialWeightedAverageTimeToFirstByteEstimator
public ExponentialWeightedAverageTimeToFirstByteEstimator()
Deprecated.Creates an instance using theDEFAULT_SMOOTHING_FACTOR.
-
ExponentialWeightedAverageTimeToFirstByteEstimator
public ExponentialWeightedAverageTimeToFirstByteEstimator(double smoothingFactor)
Deprecated.Creates an instance.- Parameters:
smoothingFactor- The exponential weighted average smoothing factor.
-
-
Method Detail
-
getTimeToFirstByteEstimateUs
public long getTimeToFirstByteEstimateUs()
Deprecated.Description copied from interface:TimeToFirstByteEstimatorReturns the estimated time to first byte of the response body, in microseconds, orC.TIME_UNSETif no estimate is available.- Specified by:
getTimeToFirstByteEstimateUsin interfaceTimeToFirstByteEstimator
-
reset
public void reset()
Deprecated.Description copied from interface:TimeToFirstByteEstimatorResets the estimator.- Specified by:
resetin interfaceTimeToFirstByteEstimator
-
onTransferInitializing
public void onTransferInitializing(DataSpec dataSpec)
Deprecated.Description copied from interface:TimeToFirstByteEstimatorCalled when a transfer is being initialized.- Specified by:
onTransferInitializingin interfaceTimeToFirstByteEstimator- Parameters:
dataSpec- Describes the data for which the transfer is initialized.
-
onTransferStart
public void onTransferStart(DataSpec dataSpec)
Deprecated.Description copied from interface:TimeToFirstByteEstimatorCalled when a transfer starts.- Specified by:
onTransferStartin interfaceTimeToFirstByteEstimator- Parameters:
dataSpec- Describes the data being transferred.
-
-