docs/doc/reference/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.html
Package com.google.android.exoplayer2.trackselection
All Implemented Interfaces:RendererCapabilities.ListenerDirect Known Subclasses:FakeTrackSelector
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classDefaultTrackSelectorextends[MappingTrackSelector](MappingTrackSelector.html "class in com.google.android.exoplayer2.trackselection")implements[RendererCapabilities.Listener](../RendererCapabilities.Listener.html "interface in com.google.android.exoplayer2")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
A default TrackSelector suitable for most use cases.
Track selection parameters should be modified by obtaining a TrackSelectionParameters.Builder initialized with the current TrackSelectionParameters from the player. The desired modifications can be made on the builder, and the resulting TrackSelectionParameters can then be built and set on the player:
player.setTrackSelectionParameters(
player.getTrackSelectionParameters()
.buildUpon()
.setMaxVideoSizeSd()
.setPreferredAudioLanguage("de")
.build());
Some specialized parameters are only available in the extended DefaultTrackSelector.Parameters class, which can be retrieved and modified in a similar way by calling methods directly on this class:
defaultTrackSelector.setParameters(
defaultTrackSelector.getParameters()
.buildUpon()
.setTunnelingEnabled(true)
.build());
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | DefaultTrackSelector.Parameters |
Deprecated.
Extends DefaultTrackSelector.Parameters by adding fields that are specific to DefaultTrackSelector.
|
| static class | DefaultTrackSelector.ParametersBuilder |
Deprecated.
Use DefaultTrackSelector.Parameters.Builder instead.
|
| protected static interface | DefaultTrackSelector.SelectionEligibility |
Deprecated.
The extent to which tracks are eligible for selection.
|
| static class | DefaultTrackSelector.SelectionOverride |
Deprecated.
A track selection override. |
-
MappingTrackSelector.MappedTrackInfo
-
TrackSelector.InvalidationListener
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| Context | context |
Deprecated.
|
| protected static int | SELECTION_ELIGIBILITY_ADAPTIVE |
Deprecated.
Track is eligible for both a fixed selection and as part of an adaptive selection with multiple tracks.
|
| protected static int | SELECTION_ELIGIBILITY_FIXED |
Deprecated.
Track is eligible for a fixed selection with one track.
|
| protected static int | SELECTION_ELIGIBILITY_NO |
Deprecated.
Track is not eligible for selection. |
Constructors | Constructor | Description |
| --- | --- |
| DefaultTrackSelector(Context context) |
Deprecated.
|
| DefaultTrackSelector(Context context, ExoTrackSelection.Factory trackSelectionFactory) |
Deprecated.
|
| DefaultTrackSelector(Context context, TrackSelectionParameters parameters) |
Deprecated.
|
| DefaultTrackSelector(Context context, TrackSelectionParameters parameters, ExoTrackSelection.Factory trackSelectionFactory) |
Deprecated.
|
| DefaultTrackSelector(TrackSelectionParameters parameters, ExoTrackSelection.Factory trackSelectionFactory) |
Deprecated.
Use DefaultTrackSelector(Context, TrackSelectionParameters, ExoTrackSelection.Factory)
|
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| DefaultTrackSelector.Parameters.Builder | buildUponParameters() |
Deprecated.
Returns a new DefaultTrackSelector.Parameters.Builder initialized with the current selection parameters.
|
| protected static int | getFormatLanguageScore(Format format, String language, boolean allowUndeterminedFormatLanguage) |
Deprecated.
Returns a score for how well a language specified in a Format matches a given language.
|
| DefaultTrackSelector.Parameters | getParameters() |
Deprecated.
Returns the current parameters for track selection.
|
| RendererCapabilities.Listener | getRendererCapabilitiesListener() |
Deprecated.
Returns the RendererCapabilities.Listener that the concrete instance uses to listen to the renderer capabilities changes.
|
| boolean | isSetParametersSupported() |
Deprecated.
Returns if this TrackSelector supports TrackSelector.setParameters(TrackSelectionParameters).
|
| protected static boolean | isSupported(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int formatSupport, boolean allowExceedsCapabilities) |
Deprecated.
Returns true if the C.FormatSupport in the given RendererCapabilities.Capabilities is C.FORMAT_HANDLED or if allowExceedsCapabilities is set and the format support is C.FORMAT_EXCEEDS_CAPABILITIES.
|
| protected static String | normalizeUndeterminedLanguageToNull(String language) |
Deprecated.
Normalizes the input string to null if it does not define a language, or returns it otherwise.
|
| void | onRendererCapabilitiesChanged(Renderer renderer) |
Deprecated.
Called when the renderer capabilities are changed.
|
| void | release() |
Deprecated.
Called by the player to release the selector.
|
| protected @NullableType ExoTrackSelection.Definition[] | selectAllTracks(MappingTrackSelector.MappedTrackInfo mappedTrackInfo, @com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][][] rendererFormatSupports, @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int[] rendererMixedMimeTypeAdaptationSupports, DefaultTrackSelector.Parameters params) |
Deprecated.
Called from selectTracks(MappedTrackInfo, int[][][], int[], MediaPeriodId, Timeline) to make a track selection for each renderer, prior to overrides and disabled flags being applied.
|
| protected Pair<ExoTrackSelection.Definition,Integer> | selectAudioTrack(MappingTrackSelector.MappedTrackInfo mappedTrackInfo, @com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][][] rendererFormatSupports, @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int[] rendererMixedMimeTypeAdaptationSupports, DefaultTrackSelector.Parameters params) |
Deprecated.
Called by selectAllTracks(MappedTrackInfo, int[][][], int[], Parameters) to create a ExoTrackSelection.Definition for an audio track selection.
|
| protected ExoTrackSelection.Definition | selectOtherTrack(int trackType, TrackGroupArray groups, @com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][] formatSupport, DefaultTrackSelector.Parameters params) |
Deprecated.
Called by selectAllTracks(MappedTrackInfo, int[][][], int[], Parameters) to create a ExoTrackSelection for a renderer whose type is neither video, audio or text.
|
| protected Pair<ExoTrackSelection.Definition,Integer> | selectTextTrack(MappingTrackSelector.MappedTrackInfo mappedTrackInfo, @com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][][] rendererFormatSupports, DefaultTrackSelector.Parameters params, String selectedAudioLanguage) |
Deprecated.
Called by selectAllTracks(MappedTrackInfo, int[][][], int[], Parameters) to create a ExoTrackSelection.Definition for a text track selection.
|
| protected Pair<@NullableType RendererConfiguration[],@NullableType ExoTrackSelection[]> | selectTracks(MappingTrackSelector.MappedTrackInfo mappedTrackInfo, @com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][][] rendererFormatSupports, @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int[] rendererMixedMimeTypeAdaptationSupport, MediaSource.MediaPeriodId mediaPeriodId, Timeline timeline) |
Deprecated.
Given mapped track information, returns a track selection and configuration for each renderer.
|
| protected Pair<ExoTrackSelection.Definition,Integer> | selectVideoTrack(MappingTrackSelector.MappedTrackInfo mappedTrackInfo, @com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][][] rendererFormatSupports, @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int[] mixedMimeTypeSupports, DefaultTrackSelector.Parameters params) |
Deprecated.
Called by selectAllTracks(MappedTrackInfo, int[][][], int[], Parameters) to create a ExoTrackSelection.Definition for a video track selection.
|
| void | setAudioAttributes(AudioAttributes audioAttributes) |
Deprecated.
Called by the player to set the AudioAttributes that will be used for playback.
|
| void | setParameters(DefaultTrackSelector.Parameters.Builder parametersBuilder) |
Deprecated.
Atomically sets the provided parameters for track selection.
|
| void | setParameters(DefaultTrackSelector.ParametersBuilder parametersBuilder) |
Deprecated.
Use setParameters(Parameters.Builder) instead.
|
| void | setParameters(TrackSelectionParameters parameters) |
Deprecated.
Called by the player to provide parameters for track selection. |
-
getCurrentMappedTrackInfo, onSelectionActivated, selectTracks
-
getBandwidthMeter, init, invalidate, invalidateForRendererCapabilitiesChange
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
protected static final int SELECTION_ELIGIBILITY_NO
Deprecated.
Track is not eligible for selection. See Also:Constant Field Values
-
protected static final int SELECTION_ELIGIBILITY_FIXED
Deprecated.
Track is eligible for a fixed selection with one track. See Also:Constant Field Values
-
protected static final int SELECTION_ELIGIBILITY_ADAPTIVE
Deprecated.
Track is eligible for both a fixed selection and as part of an adaptive selection with multiple tracks. See Also:Constant Field Values
-
@Nullable
public final[Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context
Deprecated.
-
public DefaultTrackSelector([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context)
Deprecated.
Parameters:context - Any Context.
-
public DefaultTrackSelector([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,[ExoTrackSelection.Factory](ExoTrackSelection.Factory.html "interface in com.google.android.exoplayer2.trackselection")trackSelectionFactory)
Deprecated.
Parameters:context - Any Context.trackSelectionFactory - A factory for ExoTrackSelections.
-
public DefaultTrackSelector([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,[TrackSelectionParameters](TrackSelectionParameters.html "class in com.google.android.exoplayer2.trackselection")parameters)
Deprecated.
Parameters:context - Any Context.parameters - Initial TrackSelectionParameters.
-
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public DefaultTrackSelector([TrackSelectionParameters](TrackSelectionParameters.html "class in com.google.android.exoplayer2.trackselection")parameters,[ExoTrackSelection.Factory](ExoTrackSelection.Factory.html "interface in com.google.android.exoplayer2.trackselection")trackSelectionFactory)
Deprecated.
Use DefaultTrackSelector(Context, TrackSelectionParameters, ExoTrackSelection.Factory)
-
public DefaultTrackSelector([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,[TrackSelectionParameters](TrackSelectionParameters.html "class in com.google.android.exoplayer2.trackselection")parameters,[ExoTrackSelection.Factory](ExoTrackSelection.Factory.html "interface in com.google.android.exoplayer2.trackselection")trackSelectionFactory)
Deprecated.
Parameters:context - Any Context.parameters - Initial TrackSelectionParameters.trackSelectionFactory - A factory for ExoTrackSelections.
-
public void release()
Deprecated.
Description copied from class: TrackSelector
Called by the player to release the selector. The selector cannot be used until TrackSelector.init(InvalidationListener, BandwidthMeter) is called again.
Overrides:release in class TrackSelector
-
public[DefaultTrackSelector.Parameters](DefaultTrackSelector.Parameters.html "class in com.google.android.exoplayer2.trackselection")getParameters()
Deprecated.
Description copied from class: TrackSelector
Returns the current parameters for track selection.
Overrides:getParameters in class TrackSelector
-
public boolean isSetParametersSupported()
Deprecated.
Description copied from class: TrackSelector
Returns if this TrackSelector supports TrackSelector.setParameters(TrackSelectionParameters).
The same value is always returned for a given TrackSelector instance.
Overrides:isSetParametersSupported in class TrackSelector
-
public void setParameters([TrackSelectionParameters](TrackSelectionParameters.html "class in com.google.android.exoplayer2.trackselection")parameters)
Deprecated.
Description copied from class: TrackSelector
Called by the player to provide parameters for track selection.
Only supported if TrackSelector.isSetParametersSupported() returns true.
Overrides:setParameters in class TrackSelectorParameters:parameters - The parameters for track selection.
-
public void setAudioAttributes([AudioAttributes](../audio/AudioAttributes.html "class in com.google.android.exoplayer2.audio")audioAttributes)
Deprecated.
Description copied from class: TrackSelector
Called by the player to set the AudioAttributes that will be used for playback.
Overrides:setAudioAttributes in class TrackSelector
-
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public void setParameters([DefaultTrackSelector.ParametersBuilder](DefaultTrackSelector.ParametersBuilder.html "class in com.google.android.exoplayer2.trackselection")parametersBuilder)
Deprecated.
Use setParameters(Parameters.Builder) instead.
-
public void setParameters([DefaultTrackSelector.Parameters.Builder](DefaultTrackSelector.Parameters.Builder.html "class in com.google.android.exoplayer2.trackselection")parametersBuilder)
Deprecated.
Atomically sets the provided parameters for track selection.
Parameters:parametersBuilder - A builder from which to obtain the parameters for track selection.
-
public[DefaultTrackSelector.Parameters.Builder](DefaultTrackSelector.Parameters.Builder.html "class in com.google.android.exoplayer2.trackselection")buildUponParameters()
Deprecated.
Returns a new DefaultTrackSelector.Parameters.Builder initialized with the current selection parameters.
-
@Nullable
public[RendererCapabilities.Listener](../RendererCapabilities.Listener.html "interface in com.google.android.exoplayer2")getRendererCapabilitiesListener()
Deprecated.
Description copied from class: TrackSelector
Returns the RendererCapabilities.Listener that the concrete instance uses to listen to the renderer capabilities changes. May be null if the implementation does not listen to the renderer capabilities changes.
Overrides:getRendererCapabilitiesListener in class TrackSelector
-
public void onRendererCapabilitiesChanged([Renderer](../Renderer.html "interface in com.google.android.exoplayer2")renderer)
Deprecated.
Description copied from interface: RendererCapabilities.Listener
Called when the renderer capabilities are changed.
This method will be called on the playback thread.
Specified by:onRendererCapabilitiesChanged in interface RendererCapabilities.ListenerParameters:renderer - The renderer that has its capabilities changed.
-
protected final[Pair](https://developer.android.com/reference/android/util/Pair.html "class or interface in android.util")<@NullableType[RendererConfiguration](../RendererConfiguration.html "class in com.google.android.exoplayer2")[],@NullableType[ExoTrackSelection](ExoTrackSelection.html "interface in com.google.android.exoplayer2.trackselection")[]> selectTracks([MappingTrackSelector.MappedTrackInfo](MappingTrackSelector.MappedTrackInfo.html "class in com.google.android.exoplayer2.trackselection")mappedTrackInfo,
@com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][][] rendererFormatSupports,
@com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int[] rendererMixedMimeTypeAdaptationSupport,[MediaSource.MediaPeriodId](../source/MediaSource.MediaPeriodId.html "class in com.google.android.exoplayer2.source")mediaPeriodId,[Timeline](../Timeline.html "class in com.google.android.exoplayer2")timeline)
throws[ExoPlaybackException](../ExoPlaybackException.html "class in com.google.android.exoplayer2")
Deprecated.
Description copied from class: MappingTrackSelector
Given mapped track information, returns a track selection and configuration for each renderer.
Specified by:selectTracks in class MappingTrackSelectorParameters:mappedTrackInfo - Mapped track information.rendererFormatSupports - The RendererCapabilities.Capabilities for each mapped track, indexed by renderer, track group and track (in that order).rendererMixedMimeTypeAdaptationSupport - The RendererCapabilities.AdaptiveSupport for mixed MIME type adaptation for the renderer.mediaPeriodId - The MediaSource.MediaPeriodId of the period for which tracks are to be selected.timeline - The Timeline holding the period for which tracks are to be selected.Returns:A pair consisting of the track selections and configurations for each renderer. A null configuration indicates the renderer should be disabled, in which case the track selection will also be null. A track selection may also be null for a non-disabled renderer if RendererCapabilities.getTrackType() is C.TRACK_TYPE_NONE.Throws:ExoPlaybackException - If an error occurs while selecting the tracks.
-
protected @NullableType[ExoTrackSelection.Definition](ExoTrackSelection.Definition.html "class in com.google.android.exoplayer2.trackselection")[] selectAllTracks([MappingTrackSelector.MappedTrackInfo](MappingTrackSelector.MappedTrackInfo.html "class in com.google.android.exoplayer2.trackselection")mappedTrackInfo,
@com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][][] rendererFormatSupports,
@com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int[] rendererMixedMimeTypeAdaptationSupports,[DefaultTrackSelector.Parameters](DefaultTrackSelector.Parameters.html "class in com.google.android.exoplayer2.trackselection")params)
throws[ExoPlaybackException](../ExoPlaybackException.html "class in com.google.android.exoplayer2")
Deprecated.
Called from selectTracks(MappedTrackInfo, int[][][], int[], MediaPeriodId, Timeline) 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.
Parameters:mappedTrackInfo - Mapped track information.rendererFormatSupports - The RendererCapabilities.Capabilities for each mapped track, indexed by renderer, track group and track (in that order).rendererMixedMimeTypeAdaptationSupports - The RendererCapabilities.AdaptiveSupport for mixed MIME type adaptation for the renderer.params - The parameters to use for the track selection.Returns:The ExoTrackSelection.Definitions for the renderers. A null entry indicates no selection was made.Throws:ExoPlaybackException - If an error occurs while selecting the tracks.
-
@Nullable
protected[Pair](https://developer.android.com/reference/android/util/Pair.html "class or interface in android.util")<[ExoTrackSelection.Definition](ExoTrackSelection.Definition.html "class in com.google.android.exoplayer2.trackselection"),[Integer](https://developer.android.com/reference/java/lang/Integer.html?is-external=true "class or interface in java.lang")> selectVideoTrack([MappingTrackSelector.MappedTrackInfo](MappingTrackSelector.MappedTrackInfo.html "class in com.google.android.exoplayer2.trackselection")mappedTrackInfo,
@com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][][] rendererFormatSupports,
@com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int[] mixedMimeTypeSupports,[DefaultTrackSelector.Parameters](DefaultTrackSelector.Parameters.html "class in com.google.android.exoplayer2.trackselection")params)
throws[ExoPlaybackException](../ExoPlaybackException.html "class in com.google.android.exoplayer2")
Deprecated.
Called by selectAllTracks(MappedTrackInfo, int[][][], int[], Parameters) to create a ExoTrackSelection.Definition for a video track selection.
Parameters:mappedTrackInfo - Mapped track information.rendererFormatSupports - The RendererCapabilities.Capabilities for each mapped track, indexed by renderer, track group and track (in that order).mixedMimeTypeSupports - The RendererCapabilities.AdaptiveSupport for mixed MIME type adaptation for the renderer.params - The selector's current constraint parameters.Returns:A pair of the selected ExoTrackSelection.Definition and the corresponding renderer index, or null if no selection was made.Throws:ExoPlaybackException - If an error occurs while selecting the tracks.
-
@Nullable
protected[Pair](https://developer.android.com/reference/android/util/Pair.html "class or interface in android.util")<[ExoTrackSelection.Definition](ExoTrackSelection.Definition.html "class in com.google.android.exoplayer2.trackselection"),[Integer](https://developer.android.com/reference/java/lang/Integer.html?is-external=true "class or interface in java.lang")> selectAudioTrack([MappingTrackSelector.MappedTrackInfo](MappingTrackSelector.MappedTrackInfo.html "class in com.google.android.exoplayer2.trackselection")mappedTrackInfo,
@com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][][] rendererFormatSupports,
@com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int[] rendererMixedMimeTypeAdaptationSupports,[DefaultTrackSelector.Parameters](DefaultTrackSelector.Parameters.html "class in com.google.android.exoplayer2.trackselection")params)
throws[ExoPlaybackException](../ExoPlaybackException.html "class in com.google.android.exoplayer2")
Deprecated.
Called by selectAllTracks(MappedTrackInfo, int[][][], int[], Parameters) to create a ExoTrackSelection.Definition for an audio track selection.
Parameters:mappedTrackInfo - Mapped track information.rendererFormatSupports - The RendererCapabilities.Capabilities for each mapped track, indexed by renderer, track group and track (in that order).rendererMixedMimeTypeAdaptationSupports - The RendererCapabilities.AdaptiveSupport for mixed MIME type adaptation for the renderer.params - The selector's current constraint parameters.Returns:A pair of the selected ExoTrackSelection.Definition and the corresponding renderer index, or null if no selection was made.Throws:ExoPlaybackException - If an error occurs while selecting the tracks.
-
@Nullable
protected[Pair](https://developer.android.com/reference/android/util/Pair.html "class or interface in android.util")<[ExoTrackSelection.Definition](ExoTrackSelection.Definition.html "class in com.google.android.exoplayer2.trackselection"),[Integer](https://developer.android.com/reference/java/lang/Integer.html?is-external=true "class or interface in java.lang")> selectTextTrack([MappingTrackSelector.MappedTrackInfo](MappingTrackSelector.MappedTrackInfo.html "class in com.google.android.exoplayer2.trackselection")mappedTrackInfo,
@com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][][] rendererFormatSupports,[DefaultTrackSelector.Parameters](DefaultTrackSelector.Parameters.html "class in com.google.android.exoplayer2.trackselection")params,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")selectedAudioLanguage)
throws[ExoPlaybackException](../ExoPlaybackException.html "class in com.google.android.exoplayer2")
Deprecated.
Called by selectAllTracks(MappedTrackInfo, int[][][], int[], Parameters) to create a ExoTrackSelection.Definition for a text track selection.
Parameters:mappedTrackInfo - Mapped track information.rendererFormatSupports - The RendererCapabilities.Capabilities for each mapped track, indexed by renderer, track group and track (in that order).params - The selector's current constraint parameters.selectedAudioLanguage - The language of the selected audio track. May be null if the selected audio track declares no language or no audio track was selected.Returns:A pair of the selected ExoTrackSelection.Definition and the corresponding renderer index, or null if no selection was made.Throws:ExoPlaybackException - If an error occurs while selecting the tracks.
-
@Nullable
protected[ExoTrackSelection.Definition](ExoTrackSelection.Definition.html "class in com.google.android.exoplayer2.trackselection")selectOtherTrack(int trackType,[TrackGroupArray](../source/TrackGroupArray.html "class in com.google.android.exoplayer2.source")groups,
@com.google.android.exoplayer2.RendererCapabilities.Capabilities int[][] formatSupport,[DefaultTrackSelector.Parameters](DefaultTrackSelector.Parameters.html "class in com.google.android.exoplayer2.trackselection")params)
throws[ExoPlaybackException](../ExoPlaybackException.html "class in com.google.android.exoplayer2")
Deprecated.
Called by selectAllTracks(MappedTrackInfo, int[][][], int[], Parameters) to create a ExoTrackSelection for a renderer whose type is neither video, audio or text.
Parameters:trackType - The type of the renderer.groups - The TrackGroupArray mapped to the renderer.formatSupport - The RendererCapabilities.Capabilities for each mapped track, indexed by track group and track (in that order).params - The selector's current constraint parameters.Returns:The ExoTrackSelection for the renderer, or null if no selection was made.Throws:ExoPlaybackException - If an error occurs while selecting the tracks.
-
protected static boolean isSupported(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int formatSupport,
boolean allowExceedsCapabilities)
Deprecated.
Returns true if the C.FormatSupport in the given RendererCapabilities.Capabilities is C.FORMAT_HANDLED or if allowExceedsCapabilities is set and the format support is C.FORMAT_EXCEEDS_CAPABILITIES.
Parameters:formatSupport - RendererCapabilities.Capabilities.allowExceedsCapabilities - Whether to return true if C.FormatSupport is C.FORMAT_EXCEEDS_CAPABILITIES.Returns:True if C.FormatSupport is C.FORMAT_HANDLED, or if allowExceedsCapabilities is set and the format support is C.FORMAT_EXCEEDS_CAPABILITIES.
-
@Nullable
protected static[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")normalizeUndeterminedLanguageToNull(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")language)
Deprecated.
Normalizes the input string to null if it does not define a language, or returns it otherwise.
Parameters:language - The string.Returns:The string, optionally normalized to null if it does not define a language.
-
protected static int getFormatLanguageScore([Format](../Format.html "class in com.google.android.exoplayer2")format,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")language,
boolean allowUndeterminedFormatLanguage)
Deprecated.
Returns a score for how well a language specified in a Format matches a given language.
Parameters:format - The Format.language - The language, or null.allowUndeterminedFormatLanguage - Whether matches with an empty or undetermined format language tag are allowed.Returns:A score of 4 if the languages match fully, a score of 3 if the languages match partly, a score of 2 if the languages don't match but belong to the same main language, a score of 1 if the format language is undetermined and such a match is allowed, and a score of 0 if the languages don't match at all.