public final class

MappingTrackSelector.MappedTrackInfo

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.trackselection.MappingTrackSelector.MappedTrackInfo

Overview

Provides mapped track information for each renderer.

Summary

Fields
public static final intRENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS

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.

public static final intRENDERER_SUPPORT_NO_TRACKS

The renderer does not have any associated tracks.

public static final intRENDERER_SUPPORT_PLAYABLE_TRACKS

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

public static final intRENDERER_SUPPORT_UNSUPPORTED_TRACKS

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

Methods
public intgetAdaptiveSupport(int rendererIndex, int groupIndex, boolean includeCapabilitiesExceededTracks)

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

public intgetAdaptiveSupport(int rendererIndex, int groupIndex, int[] trackIndices[])

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

public intgetCapabilities(int rendererIndex, int groupIndex, int trackIndex)

Returns the RendererCapabilities.Capabilities of the renderer for an individual track.

public intgetRendererCount()

Returns the number of renderers.

public java.lang.StringgetRendererName(int rendererIndex)

Returns the name of the renderer at a given index.

public intgetRendererSupport(int rendererIndex)

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

public intgetRendererType(int rendererIndex)

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

public TrackGroupArraygetTrackGroups(int rendererIndex)

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

public intgetTrackSupport(int rendererIndex, int groupIndex, int trackIndex)

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

public intgetTypeSupport(int trackType)

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

public TrackGroupArraygetUnmappedTrackGroups()

Returns TrackGroups not mapped to any renderer.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int RENDERER_SUPPORT_NO_TRACKS

The renderer does not have any associated tracks.

public static final int RENDERER_SUPPORT_UNSUPPORTED_TRACKS

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

public static final int RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS

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, MappingTrackSelector.MappedTrackInfo.getTrackSupport(int, int, int) returns C.FORMAT_EXCEEDS_CAPABILITIES for at least one track mapped to the renderer, but does not return C.FORMAT_HANDLED for any tracks mapped to the renderer.

public static final int RENDERER_SUPPORT_PLAYABLE_TRACKS

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

Methods

public int getRendererCount()

Returns the number of renderers.

public java.lang.String getRendererName(int rendererIndex)

Returns the name of the renderer at a given index.

Parameters:

rendererIndex: The renderer index.

Returns:

The name of the renderer.

See also: Renderer.getName()

public int getRendererType(int rendererIndex)

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

Parameters:

rendererIndex: The renderer index.

Returns:

The of the renderer.

See also: Renderer.getTrackType()

public TrackGroupArray getTrackGroups(int rendererIndex)

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

Parameters:

rendererIndex: The renderer index.

Returns:

The corresponding TrackGroups.

public int getRendererSupport(int rendererIndex)

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

Parameters:

rendererIndex: The renderer index.

Returns:

The MappingTrackSelector.MappedTrackInfo.RendererSupport.

public int getTypeSupport(int trackType)

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

Parameters:

trackType: The .

Returns:

The MappingTrackSelector.MappedTrackInfo.RendererSupport.

public int getCapabilities(int rendererIndex, int groupIndex, int trackIndex)

Returns the RendererCapabilities.Capabilities of the renderer for an individual track.

Parameters:

rendererIndex: The renderer index.
groupIndex: The index of the track group to which the track belongs.
trackIndex: The index of the track within the track group.

Returns:

The RendererCapabilities.Capabilities.

public int getTrackSupport(int rendererIndex, int groupIndex, int trackIndex)

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

Parameters:

rendererIndex: The renderer index.
groupIndex: The index of the track group to which the track belongs.
trackIndex: The index of the track within the track group.

Returns:

The C.FormatSupport.

public int getAdaptiveSupport(int rendererIndex, int groupIndex, boolean includeCapabilitiesExceededTracks)

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

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

Parameters:

rendererIndex: The renderer index.
groupIndex: The index of the track group.
includeCapabilitiesExceededTracks: Whether tracks that exceed the capabilities of the renderer are included when determining support.

Returns:

The RendererCapabilities.AdaptiveSupport.

public int getAdaptiveSupport(int rendererIndex, int groupIndex, int[] trackIndices[])

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

Parameters:

rendererIndex: The renderer index.
groupIndex: The index of the track group.

Returns:

The RendererCapabilities.AdaptiveSupport.

public TrackGroupArray getUnmappedTrackGroups()

Returns TrackGroups not mapped to any renderer.