FakeTrackSelector
@UnstableApi
public class FakeTrackSelector extends DefaultTrackSelector
A fake MappingTrackSelector that returns FakeTrackSelections.
Summary
Nested types |
|---|
public class FakeTrackSelector.FakeTrackSelectionFactory implements ExoTrackSelection.FactoryA factory for the |
Public constructors |
|---|
FakeTrackSelector( |
FakeTrackSelector(boolean mayReuseTrackSelection) |
Public methods |
|
|---|---|
List<FakeTrackSelection> |
Returns list of all |
Protected methods |
|
|---|---|
ExoTrackSelection.Definition[] |
selectAllTracks(Called from |
Inherited Constants |
||||||
|---|---|---|---|---|---|---|
|
Inherited fields |
||||
|---|---|---|---|---|
|
||||
Inherited methods |
||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
|
Public constructors
FakeTrackSelector
public FakeTrackSelector(
FakeTrackSelector.FakeTrackSelectionFactory fakeTrackSelectionFactory
)
| Parameters | |
|---|---|
FakeTrackSelector.FakeTrackSelectionFactory fakeTrackSelectionFactory |
The |
FakeTrackSelector
public FakeTrackSelector(boolean mayReuseTrackSelection)
| Parameters | |
|---|---|
boolean mayReuseTrackSelection |
Whether this |
Public methods
getAllTrackSelections
public List<FakeTrackSelection> getAllTrackSelections()
Returns list of all FakeTrackSelections that this track selector has made so far.
Protected methods
selectAllTracks
protected ExoTrackSelection.Definition[] selectAllTracks(
MappingTrackSelector.MappedTrackInfo mappedTrackInfo,
@RendererCapabilities.Capabilities int[][][] rendererFormatSupports,
@RendererCapabilities.AdaptiveSupport int[] rendererMixedMimeTypeAdaptationSupports,
DefaultTrackSelector.Parameters params
)
Called from selectTracks to make a track selection for each renderer, prior to overrides and disabled flags being applied.
The implementation should not account for overrides and disabled flags. Track selections generated by this method will be overridden to account for these properties.
If selection parameters include audioOffloadPreferences with audioOffloadMode set to AUDIO_OFFLOAD_MODE_REQUIRED then only audio tracks will be selected. If no audio track is supported in offload, then no track will be selected.
| Parameters | |
|---|---|
MappingTrackSelector.MappedTrackInfo mappedTrackInfo |
Mapped track information. |
@RendererCapabilities.Capabilities int[][][] rendererFormatSupports |
The |
@RendererCapabilities.AdaptiveSupport int[] rendererMixedMimeTypeAdaptationSupports |
The |
DefaultTrackSelector.Parameters params |
The parameters to use for the track selection. |
| Returns | |
|---|---|
ExoTrackSelection.Definition[] |
The |
| Throws | |
|---|---|
androidx.media3.exoplayer.ExoPlaybackException |
If an error occurs while selecting the tracks. |