public abstract class MappingTrackSelector extends TrackSelector
TrackSelectors that first establish a mapping between TrackGroups
and Renderers, and then from that mapping create a TrackSelection for each
renderer.| Modifier and Type | Class and Description |
|---|---|
static class |
MappingTrackSelector.MappedTrackInfo
Provides mapped track information for each renderer.
|
TrackSelector.InvalidationListener| Constructor and Description |
|---|
MappingTrackSelector() |
| Modifier and Type | Method and Description |
|---|---|
MappingTrackSelector.MappedTrackInfo |
getCurrentMappedTrackInfo()
Returns the mapping information for the currently active track selection, or null if no
selection is currently active.
|
void |
onSelectionActivated(java.lang.Object info)
Called by the player when a
TrackSelectorResult previously generated by
TrackSelector.selectTracks(RendererCapabilities[], TrackGroupArray) is activated. |
protected abstract android.util.Pair<RendererConfiguration[],TrackSelection[]> |
selectTracks(MappingTrackSelector.MappedTrackInfo mappedTrackInfo,
int[][][] rendererFormatSupports,
int[] rendererMixedMimeTypeAdaptationSupport)
Given mapped track information, returns a track selection and configuration for each renderer.
|
TrackSelectorResult |
selectTracks(RendererCapabilities[] rendererCapabilities,
TrackGroupArray trackGroups)
Called by the player to perform a track selection.
|
init, invalidate@Nullable public final MappingTrackSelector.MappedTrackInfo getCurrentMappedTrackInfo()
public final void onSelectionActivated(java.lang.Object info)
TrackSelectorTrackSelectorResult previously generated by
TrackSelector.selectTracks(RendererCapabilities[], TrackGroupArray) is activated.onSelectionActivated in class TrackSelectorinfo - The value of TrackSelectorResult.info in the activated selection.public final TrackSelectorResult selectTracks(RendererCapabilities[] rendererCapabilities, TrackGroupArray trackGroups) throws ExoPlaybackException
TrackSelectorselectTracks in class TrackSelectorrendererCapabilities - The RendererCapabilities of the renderers for which tracks
are to be selected.trackGroups - The available track groups.TrackSelectorResult describing the track selections.ExoPlaybackException - If an error occurs selecting tracks.protected abstract android.util.Pair<RendererConfiguration[],TrackSelection[]> selectTracks(MappingTrackSelector.MappedTrackInfo mappedTrackInfo, int[][][] rendererFormatSupports, int[] rendererMixedMimeTypeAdaptationSupport) throws ExoPlaybackException
mappedTrackInfo - Mapped track information.rendererFormatSupports - The result of RendererCapabilities.supportsFormat(com.google.android.exoplayer2.Format) for
each mapped track, indexed by renderer, track group and track (in that order).rendererMixedMimeTypeAdaptationSupport - The result of RendererCapabilities.supportsMixedMimeTypeAdaptation() for each renderer.RendererCapabilities.getTrackType() is C.TRACK_TYPE_NONE.ExoPlaybackException - If an error occurs while selecting the tracks.