Back to Exoplayer

TrackSelectorResult (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/trackselection/TrackSelectorResult.html

latest9.3 KB
Original Source

Package com.google.android.exoplayer2.trackselection

Class TrackSelectorResult

  • java.lang.Object

    • com.google.android.exoplayer2.trackselection.TrackSelectorResult

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classTrackSelectorResultextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

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 a TrackSelector operation.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | Object | info | Deprecated.

An opaque object that will be returned to TrackSelector.onSelectionActivated(Object) should the selections be activated. | | int | length | Deprecated.

The number of selections in the result. | | @NullableType RendererConfiguration[] | rendererConfigurations | Deprecated.

A RendererConfiguration for each renderer. | | @NullableType ExoTrackSelection[] | selections | Deprecated.

A ExoTrackSelection 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) | Deprecated. Use TrackSelectorResult(RendererConfiguration[], ExoTrackSelection[], Tracks, Object).

|

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 to other for all renderers. | | boolean | isEquivalent​(TrackSelectorResult other, int index) | Deprecated.

Returns whether this result is equivalent to other for the renderer at the given index. | | boolean | isRendererEnabled​(int index) | Deprecated.

Returns whether the renderer at the specified index is enabled. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

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](../RendererConfiguration.html "class in com.google.android.exoplayer2")[] rendererConfigurations

Deprecated.

A RendererConfiguration for each renderer. A null entry indicates the corresponding renderer should be disabled.

- 

selections

public final @NullableType[ExoTrackSelection](ExoTrackSelection.html "interface in com.google.android.exoplayer2.trackselection")[] selections

Deprecated.

A ExoTrackSelection array containing the track selection for each renderer.

- 

tracks

public final[Tracks](../Tracks.html "class in com.google.android.exoplayer2")tracks

Deprecated.

Describe the tracks and which one were selected.

- 

info

@Nullable
public final[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")info

Deprecated.

An opaque object that will be returned to TrackSelector.onSelectionActivated(Object) should the selections be activated.

Constructor Detail

- 

TrackSelectorResult

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public TrackSelectorResult​(@NullableType[RendererConfiguration](../RendererConfiguration.html "class in com.google.android.exoplayer2")[] rendererConfigurations,
                           @NullableType[ExoTrackSelection](ExoTrackSelection.html "interface in com.google.android.exoplayer2.trackselection")[] selections,
                           @Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")info)

Deprecated. Use TrackSelectorResult(RendererConfiguration[], ExoTrackSelection[], Tracks, Object).

Parameters:rendererConfigurations - A RendererConfiguration for each renderer. A null entry indicates the corresponding renderer should be disabled.selections - A ExoTrackSelection array containing the selection for each renderer.info - An opaque object that will be returned to TrackSelector.onSelectionActivated(Object) should the selection be activated. May be null.

- 

TrackSelectorResult

public TrackSelectorResult​(@NullableType[RendererConfiguration](../RendererConfiguration.html "class in com.google.android.exoplayer2")[] rendererConfigurations,
                           @NullableType[ExoTrackSelection](ExoTrackSelection.html "interface in com.google.android.exoplayer2.trackselection")[] selections,[Tracks](../Tracks.html "class in com.google.android.exoplayer2")tracks,
                           @Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")info)

Deprecated. Parameters:rendererConfigurations - A RendererConfiguration for each renderer. A null entry indicates the corresponding renderer should be disabled.selections - A ExoTrackSelection 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 to TrackSelector.onSelectionActivated(Object) should the selection be activated. May be null.

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](TrackSelectorResult.html "class in com.google.android.exoplayer2.trackselection")other)

Deprecated.

Returns whether this result is equivalent to other for all renderers. Parameters:other - The other TrackSelectorResult. May be null, in which case false will be returned.Returns:Whether this result is equivalent to other for all renderers.

- 

isEquivalent

public boolean isEquivalent​(@Nullable[TrackSelectorResult](TrackSelectorResult.html "class in com.google.android.exoplayer2.trackselection")other,
                            int index)

Deprecated.

Returns whether this result is equivalent to other 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 other TrackSelectorResult. May be null, in which case false 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.