MappingTrackSelector.MappedTrackInfo


class MappingTrackSelector.MappedTrackInfo


Provides mapped track information for each renderer.

Summary

Nested types

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = )
@IntDef(value = )
annotation MappingTrackSelector.MappedTrackInfo.RendererSupport

Levels of renderer support.

Constants

const Int

The renderer has tracks mapped to it and at least one is of a supported type, but all such tracks exceed the renderer's capabilities.

const Int

The renderer does not have any associated tracks.

const Int

The renderer has tracks mapped to it, and at least one such track is playable.

const Int

The renderer has tracks mapped to it, but all are unsupported.

Public functions

Int
@RendererCapabilities.AdaptiveSupport
getAdaptiveSupport(
    rendererIndex: Int,
    groupIndex: Int,
    includeCapabilitiesExceededTracks: Boolean
)

Returns the extent to which a renderer supports adaptation between supported tracks in a specified TrackGroup.

Int
@RendererCapabilities.AdaptiveSupport
getAdaptiveSupport(
    rendererIndex: Int,
    groupIndex: Int,
    trackIndices: IntArray!
)

Returns the extent to which a renderer supports adaptation between specified tracks within a TrackGroup.

Int
@RendererCapabilities.Capabilities
getCapabilities(rendererIndex: Int, groupIndex: Int, trackIndex: Int)

Returns the Capabilities of the renderer for an individual track.

String!
getRendererName(rendererIndex: Int)

Returns the name of the renderer at a given index.

Int

Returns the extent to which a renderer can play the tracks that are mapped to it.

Int

Returns the track type that the renderer at a given index handles.

TrackGroupArray!
getTrackGroups(rendererIndex: Int)

Returns the TrackGroups mapped to the renderer at the specified index.

Int
@C.FormatSupport
getTrackSupport(rendererIndex: Int, groupIndex: Int, trackIndex: Int)

Returns the extent to which an individual track is supported by the renderer.

Int

Returns the extent to which tracks of a specified type are supported.

Constants

RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS

const val RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS = 2: Int

The renderer has tracks mapped to it and at least one is of a supported type, but all such tracks exceed the renderer's capabilities. In other words, getTrackSupport returns FORMAT_EXCEEDS_CAPABILITIES for at least one track mapped to the renderer, but does not return FORMAT_HANDLED for any tracks mapped to the renderer.

RENDERER_SUPPORT_NO_TRACKS

const val RENDERER_SUPPORT_NO_TRACKS = 0: Int

The renderer does not have any associated tracks.

RENDERER_SUPPORT_PLAYABLE_TRACKS

const val RENDERER_SUPPORT_PLAYABLE_TRACKS = 3: Int

The renderer has tracks mapped to it, and at least one such track is playable. In other words, getTrackSupport returns FORMAT_HANDLED for at least one track mapped to the renderer.

RENDERER_SUPPORT_UNSUPPORTED_TRACKS

const val RENDERER_SUPPORT_UNSUPPORTED_TRACKS = 1: Int

The renderer has tracks mapped to it, but all are unsupported. In other words, getTrackSupport returns FORMAT_UNSUPPORTED_DRM, FORMAT_UNSUPPORTED_SUBTYPE or FORMAT_UNSUPPORTED_TYPE for all tracks mapped to the renderer.

Public functions

getAdaptiveSupport

@RendererCapabilities.AdaptiveSupport
fun getAdaptiveSupport(
    rendererIndex: Int,
    groupIndex: Int,
    includeCapabilitiesExceededTracks: Boolean
): Int

Returns the extent to which a renderer supports adaptation between supported tracks in a specified TrackGroup.

Tracks for which getTrackSupport returns FORMAT_HANDLED are always considered. Tracks for which getTrackSupport returns FORMAT_EXCEEDS_CAPABILITIES are also considered if includeCapabilitiesExceededTracks is set to true. Tracks for which getTrackSupport returns FORMAT_UNSUPPORTED_DRM, FORMAT_UNSUPPORTED_TYPE or FORMAT_UNSUPPORTED_SUBTYPE are never considered.

Parameters
rendererIndex: Int

The renderer index.

groupIndex: Int

The index of the track group.

includeCapabilitiesExceededTracks: Boolean

Whether tracks that exceed the capabilities of the renderer are included when determining support.

Returns
Int

The AdaptiveSupport.

getAdaptiveSupport

@RendererCapabilities.AdaptiveSupport
fun getAdaptiveSupport(
    rendererIndex: Int,
    groupIndex: Int,
    trackIndices: IntArray!
): Int

Returns the extent to which a renderer supports adaptation between specified tracks within a TrackGroup.

Parameters
rendererIndex: Int

The renderer index.

groupIndex: Int

The index of the track group.

trackIndices: IntArray!

The indices of the tracks in the track group for which to query support.

Returns
Int

The AdaptiveSupport.

getCapabilities

@RendererCapabilities.Capabilities
fun getCapabilities(rendererIndex: Int, groupIndex: Int, trackIndex: Int): Int

Returns the Capabilities of the renderer for an individual track.

Parameters
rendererIndex: Int

The renderer index.

groupIndex: Int

The index of the track group to which the track belongs.

trackIndex: Int

The index of the track within the track group.

Returns
Int

The Capabilities.

getRendererName

fun getRendererName(rendererIndex: Int): String!

Returns the name of the renderer at a given index.

Parameters
rendererIndex: Int

The renderer index.

Returns
String!

The name of the renderer.

See also
getName

getRendererSupport

@MappingTrackSelector.MappedTrackInfo.RendererSupport
fun getRendererSupport(rendererIndex: Int): Int

Returns the extent to which a renderer can play the tracks that are mapped to it.

Parameters
rendererIndex: Int

The renderer index.

Returns
Int

The RendererSupport.

getRendererType

@C.TrackType
fun getRendererType(rendererIndex: Int): Int

Returns the track type that the renderer at a given index handles.

Parameters
rendererIndex: Int

The renderer index.

Returns
Int

The C.TrackType of the renderer.

See also
getTrackType

getTrackGroups

fun getTrackGroups(rendererIndex: Int): TrackGroupArray!

Returns the TrackGroups mapped to the renderer at the specified index.

Parameters
rendererIndex: Int

The renderer index.

Returns
TrackGroupArray!

The corresponding TrackGroups.

getTrackSupport

@C.FormatSupport
fun getTrackSupport(rendererIndex: Int, groupIndex: Int, trackIndex: Int): Int

Returns the extent to which an individual track is supported by the renderer.

Parameters
rendererIndex: Int

The renderer index.

groupIndex: Int

The index of the track group to which the track belongs.

trackIndex: Int

The index of the track within the track group.

Returns
Int

The FormatSupport.

getTypeSupport

@MappingTrackSelector.MappedTrackInfo.RendererSupport
fun getTypeSupport(@C.TrackType trackType: Int): Int

Returns the extent to which tracks of a specified type are supported. This is the best level of support obtained from getRendererSupport for all renderers that handle the specified type. If no such renderers exist then RENDERER_SUPPORT_NO_TRACKS is returned.

Parameters
@C.TrackType trackType: Int

The track type.

Returns
Int

The RendererSupport.

Public properties

rendererCount

val rendererCountInt

unmappedTrackGroups

val unmappedTrackGroupsTrackGroupArray!