Class TrackSelectorResult


  • public final class TrackSelectorResult
    extends Object
    The result of a TrackSelector operation.
    • Field Detail

      • length

        public final int length
        The number of selections in the result. Greater than or equal to zero.
      • rendererConfigurations

        public final @NullableType RendererConfiguration[] rendererConfigurations
        A RendererConfiguration for each renderer. A null entry indicates the corresponding renderer should be disabled.
      • tracksInfo

        public final TracksInfo tracksInfo
        Describe the tracks and which one were selected.
    • Method Detail

      • isRendererEnabled

        public boolean isRendererEnabled​(int index)
        Returns whether the renderer at the specified index is enabled.
      • isEquivalent

        public boolean isEquivalent​(@Nullable
                                    TrackSelectorResult other)
        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 other,
                                    int index)
        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.