DefaultBandwidthMeter.InitialBitrateSupplier


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 functions

Long

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

Public functions

getInitialBitrateEstimate

fun getInitialBitrateEstimate(@C.NetworkType networkType: Int): Long

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 networkType: Int

The current C.NetworkType.

Returns
Long

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