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 aTrackSelector
operation.
-
-
Field Summary
Fields Modifier and Type Field Description Object
info
Deprecated.An opaque object that will be returned toTrackSelector.onSelectionActivated(Object)
should the selections be activated.int
length
Deprecated.The number of selections in the result.@NullableType RendererConfiguration[]
rendererConfigurations
Deprecated.ARendererConfiguration
for each renderer.@NullableType ExoTrackSelection[]
selections
Deprecated.AExoTrackSelection
array containing the track selection for each renderer.Tracks
tracks
Deprecated.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 boolean
isEquivalent(TrackSelectorResult other)
Deprecated.Returns whether this result is equivalent toother
for all renderers.boolean
isEquivalent(TrackSelectorResult other, int index)
Deprecated.Returns whether this result is equivalent toother
for the renderer at the given index.boolean
isRendererEnabled(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.ARendererConfiguration
for each renderer. A null entry indicates the corresponding renderer should be disabled.
-
selections
public final @NullableType ExoTrackSelection[] selections
Deprecated.AExoTrackSelection
array 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
- ARendererConfiguration
for each renderer. A null entry indicates the corresponding renderer should be disabled.selections
- AExoTrackSelection
array 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
- ARendererConfiguration
for each renderer. A null entry indicates the corresponding renderer should be disabled.selections
- AExoTrackSelection
array 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 toother
for all renderers.- Parameters:
other
- The otherTrackSelectorResult
. May be null, in which casefalse
will be returned.- Returns:
- Whether this result is equivalent to
other
for all renderers.
-
isEquivalent
public boolean isEquivalent(@Nullable TrackSelectorResult other, int index)
Deprecated.Returns whether this result is equivalent toother
for 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 casefalse
will be returned.index
- The renderer index to check for equivalence.- Returns:
- Whether this result is equivalent to
other
for the renderer at the specified index.
-
-