Class TrackSelectorResult
- java.lang.Object
-
- com.google.android.exoplayer2.trackselection.TrackSelectorResult
-
@Deprecated public final class TrackSelectorResult extends Object
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.The result of aTrackSelectoroperation.
-
-
Field Summary
Fields Modifier and Type Field Description ObjectinfoDeprecated.An opaque object that will be returned toTrackSelector.onSelectionActivated(Object)should the selections be activated.intlengthDeprecated.The number of selections in the result.@NullableType RendererConfiguration[]rendererConfigurationsDeprecated.ARendererConfigurationfor each renderer.@NullableType ExoTrackSelection[]selectionsDeprecated.AExoTrackSelectionarray containing the track selection for each renderer.TrackstracksDeprecated.Describe the tracks and which one were selected.
-
Constructor Summary
Constructors Constructor Description TrackSelectorResult(@NullableType RendererConfiguration[] rendererConfigurations, @NullableType ExoTrackSelection[] selections, Tracks tracks, Object info)Deprecated.TrackSelectorResult(@NullableType RendererConfiguration[] rendererConfigurations, @NullableType ExoTrackSelection[] selections, Object info)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanisEquivalent(TrackSelectorResult other)Deprecated.Returns whether this result is equivalent tootherfor all renderers.booleanisEquivalent(TrackSelectorResult other, int index)Deprecated.Returns whether this result is equivalent tootherfor the renderer at the given index.booleanisRendererEnabled(int index)Deprecated.Returns whether the renderer at the specified index is enabled.
-
-
-
Field Detail
-
length
public final int length
Deprecated.The number of selections in the result. Greater than or equal to zero.
-
rendererConfigurations
public final @NullableType RendererConfiguration[] rendererConfigurations
Deprecated.ARendererConfigurationfor each renderer. A null entry indicates the corresponding renderer should be disabled.
-
selections
public final @NullableType ExoTrackSelection[] selections
Deprecated.AExoTrackSelectionarray containing the track selection for each renderer.
-
tracks
public final Tracks tracks
Deprecated.Describe the tracks and which one were selected.
-
info
@Nullable public final Object info
Deprecated.An opaque object that will be returned toTrackSelector.onSelectionActivated(Object)should the selections be activated.
-
-
Constructor Detail
-
TrackSelectorResult
@Deprecated public TrackSelectorResult(@NullableType RendererConfiguration[] rendererConfigurations, @NullableType ExoTrackSelection[] selections, @Nullable Object info)
- Parameters:
rendererConfigurations- ARendererConfigurationfor each renderer. A null entry indicates the corresponding renderer should be disabled.selections- AExoTrackSelectionarray containing the selection for each renderer.info- An opaque object that will be returned toTrackSelector.onSelectionActivated(Object)should the selection be activated. May benull.
-
TrackSelectorResult
public TrackSelectorResult(@NullableType RendererConfiguration[] rendererConfigurations, @NullableType ExoTrackSelection[] selections, Tracks tracks, @Nullable Object info)
Deprecated.- Parameters:
rendererConfigurations- ARendererConfigurationfor each renderer. A null entry indicates the corresponding renderer should be disabled.selections- AExoTrackSelectionarray containing the selection for each renderer.tracks- Description of the available tracks and which one were selected.info- An opaque object that will be returned toTrackSelector.onSelectionActivated(Object)should the selection be activated. May benull.
-
-
Method Detail
-
isRendererEnabled
public boolean isRendererEnabled(int index)
Deprecated.Returns whether the renderer at the specified index is enabled.
-
isEquivalent
public boolean isEquivalent(@Nullable TrackSelectorResult other)Deprecated.Returns whether this result is equivalent tootherfor all renderers.- Parameters:
other- The otherTrackSelectorResult. May be null, in which casefalsewill be returned.- Returns:
- Whether this result is equivalent to
otherfor all renderers.
-
isEquivalent
public boolean isEquivalent(@Nullable TrackSelectorResult other, int index)Deprecated.Returns whether this result is equivalent tootherfor the renderer at the given index. The results are equivalent if they have equal track selections and configurations for the renderer.- Parameters:
other- The otherTrackSelectorResult. May be null, in which casefalsewill be returned.index- The renderer index to check for equivalence.- Returns:
- Whether this result is equivalent to
otherfor the renderer at the specified index.
-
-