public final class TrackSelectorResult
extends java.lang.Object
TrackSelector operation.| Modifier and Type | Field and Description |
|---|---|
java.lang.Object |
info
An opaque object that will be returned to
TrackSelector.onSelectionActivated(Object)
should the selections be activated. |
int |
length
The number of selections in the result.
|
@NullableType RendererConfiguration[] |
rendererConfigurations
A
RendererConfiguration for each renderer. |
TrackSelectionArray |
selections
A
TrackSelectionArray containing the track selection for each renderer. |
| Constructor and Description |
|---|
TrackSelectorResult(@NullableType RendererConfiguration[] rendererConfigurations,
@NullableType TrackSelection[] selections,
java.lang.Object info) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEquivalent(TrackSelectorResult other)
Returns whether this result is equivalent to
other for all renderers. |
boolean |
isEquivalent(TrackSelectorResult other,
int index)
Returns whether this result is equivalent to
other for the renderer at the given index. |
boolean |
isRendererEnabled(int index)
Returns whether the renderer at the specified index is enabled.
|
public final int length
public final @NullableType RendererConfiguration[] rendererConfigurations
RendererConfiguration for each renderer. A null entry indicates the corresponding
renderer should be disabled.public final TrackSelectionArray selections
TrackSelectionArray containing the track selection for each renderer.public final java.lang.Object info
TrackSelector.onSelectionActivated(Object)
should the selections be activated.public TrackSelectorResult(@NullableType RendererConfiguration[] rendererConfigurations, @NullableType TrackSelection[] selections, java.lang.Object info)
rendererConfigurations - A RendererConfiguration for each renderer. A null entry
indicates the corresponding renderer should be disabled.selections - A TrackSelectionArray containing the selection for each renderer.info - An opaque object that will be returned to TrackSelector.onSelectionActivated(Object) should the selection be activated.public boolean isRendererEnabled(int index)
public boolean isEquivalent(TrackSelectorResult other)
other for all renderers.other - The other TrackSelectorResult. May be null, in which case false
will be returned.other for all renderers.public boolean isEquivalent(TrackSelectorResult other, int index)
other for the renderer at the given index.
The results are equivalent if they have equal renderersEnabled array, track selections, and
configurations for the renderer.other - The other TrackSelectorResult. May be null, in which case false
will be returned.index - The renderer index to check for equivalence.other for the renderer at the specified
index.