Back to Exoplayer

ExponentialWeightedAverageTimeToFirstByteEstimator (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/upstream/experimental/ExponentialWeightedAverageTimeToFirstByteEstimator.html

latest5.2 KB
Original Source

Package com.google.android.exoplayer2.upstream.experimental

Class ExponentialWeightedAverageTimeToFirstByteEstimator

  • java.lang.Object

    • com.google.android.exoplayer2.upstream.experimental.ExponentialWeightedAverageTimeToFirstByteEstimator
  • All Implemented Interfaces:TimeToFirstByteEstimator


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classExponentialWeightedAverageTimeToFirstByteEstimatorextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[TimeToFirstByteEstimator](../TimeToFirstByteEstimator.html "interface in com.google.android.exoplayer2.upstream")

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 of TimeToFirstByteEstimator based on exponential weighted average.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static double | DEFAULT_SMOOTHING_FACTOR | Deprecated.

The default smoothing factor. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | ExponentialWeightedAverageTimeToFirstByteEstimator() | Deprecated.

Creates an instance using the DEFAULT_SMOOTHING_FACTOR. | | ExponentialWeightedAverageTimeToFirstByteEstimator​(double smoothingFactor) | Deprecated.

Creates an instance. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | long | getTimeToFirstByteEstimateUs() | Deprecated.

Returns the estimated time to first byte of the response body, in microseconds, or C.TIME_UNSET if no estimate is available. | | void | onTransferInitializing​(DataSpec dataSpec) | Deprecated.

Called when a transfer is being initialized. | | void | onTransferStart​(DataSpec dataSpec) | Deprecated.

Called when a transfer starts. | | void | reset() | Deprecated.

Resets the estimator. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

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 the DEFAULT_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: TimeToFirstByteEstimator

Returns the estimated time to first byte of the response body, in microseconds, or C.TIME_UNSET if no estimate is available. Specified by:getTimeToFirstByteEstimateUs in interface TimeToFirstByteEstimator

- 

reset

public void reset()

Deprecated.

Description copied from interface: TimeToFirstByteEstimator

Resets the estimator. Specified by:reset in interface TimeToFirstByteEstimator

- 

onTransferInitializing

public void onTransferInitializing​([DataSpec](../DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec)

Deprecated.

Description copied from interface: TimeToFirstByteEstimator

Called when a transfer is being initialized. Specified by:onTransferInitializing in interface TimeToFirstByteEstimatorParameters:dataSpec - Describes the data for which the transfer is initialized.

- 

onTransferStart

public void onTransferStart​([DataSpec](../DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec)

Deprecated.

Description copied from interface: TimeToFirstByteEstimator

Called when a transfer starts. Specified by:onTransferStart in interface TimeToFirstByteEstimatorParameters:dataSpec - Describes the data being transferred.