DefaultBandwidthMeter.InitialBitrateSupplier


public interface DefaultBandwidthMeter.InitialBitrateSupplier


Supplies an initial bitrate estimate to the DefaultBandwidthMeter.

This interface allows applications to provide custom logic for determining the initial bitrate when a bandwidth estimate is unavailable.

Summary

Public methods

abstract long

Returns an initial bitrate estimate in bits per second (bps) for the given network type.

Public methods

getInitialBitrateEstimate

abstract long getInitialBitrateEstimate(@C.NetworkType int networkType)

Returns an initial bitrate estimate in bits per second (bps) for the given network type.

Implementations can return a specific value based on the networkType. If the supplier doesn't have a specific estimate for the given networkType, it should return TIME_UNSET. In this case, DefaultBandwidthMeter will fall back to its internal default logic for that network type.

Parameters
@C.NetworkType int networkType

The current C.NetworkType.

Returns
long

The initial bitrate estimate in bps, or TIME_UNSET to use the default fallback.