ExoTrackSelection.Factory


public interface ExoTrackSelection.Factory


Factory for ExoTrackSelection instances.

Summary

Public methods

abstract @Nullable ExoTrackSelection[]
createTrackSelections(
    @Nullable ExoTrackSelection.Definition[] definitions,
    BandwidthMeter bandwidthMeter,
    MediaSource.MediaPeriodId mediaPeriodId,
    Timeline timeline
)

Creates track selections for the provided Definitions.

Public methods

createTrackSelections

abstract @Nullable ExoTrackSelection[] createTrackSelections(
    @Nullable ExoTrackSelection.Definition[] definitions,
    BandwidthMeter bandwidthMeter,
    MediaSource.MediaPeriodId mediaPeriodId,
    Timeline timeline
)

Creates track selections for the provided Definitions.

Implementations that create at most one adaptive track selection may use createTrackSelectionsForDefinitions.

Parameters
@Nullable ExoTrackSelection.Definition[] definitions

A Definition array. May include null values.

BandwidthMeter bandwidthMeter

A BandwidthMeter which can be used to select tracks.

MediaSource.MediaPeriodId mediaPeriodId

The MediaPeriodId of the period for which tracks are to be selected.

Timeline timeline

The Timeline holding the period for which tracks are to be selected.

Returns
@Nullable ExoTrackSelection[]

The created selections. Must have the same length as definitions and may include null values.