Class MappingTrackSelector.MappedTrackInfo
- java.lang.Object
-
- com.google.android.exoplayer2.trackselection.MappingTrackSelector.MappedTrackInfo
-
- Enclosing class:
- MappingTrackSelector
public static final class MappingTrackSelector.MappedTrackInfo extends Object
Provides mapped track information for each renderer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMappingTrackSelector.MappedTrackInfo.RendererSupportLevels of renderer support.
-
Field Summary
Fields Modifier and Type Field Description static intRENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKSThe renderer has tracks mapped to it and at least one is of a supported type, but all such tracks exceed the renderer's capabilities.static intRENDERER_SUPPORT_NO_TRACKSThe renderer does not have any associated tracks.static intRENDERER_SUPPORT_PLAYABLE_TRACKSThe renderer has tracks mapped to it, and at least one such track is playable.static intRENDERER_SUPPORT_UNSUPPORTED_TRACKSThe renderer has tracks mapped to it, but all are unsupported.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport intgetAdaptiveSupport(int rendererIndex, int groupIndex, boolean includeCapabilitiesExceededTracks)Returns the extent to which a renderer supports adaptation between supported tracks in a specifiedTrackGroup.@com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport intgetAdaptiveSupport(int rendererIndex, int groupIndex, int[] trackIndices)Returns the extent to which a renderer supports adaptation between specified tracks within aTrackGroup.@com.google.android.exoplayer2.RendererCapabilities.Capabilities intgetCapabilities(int rendererIndex, int groupIndex, int trackIndex)Returns theRendererCapabilities.Capabilitiesof the renderer for an individual track.intgetRendererCount()Returns the number of renderers.StringgetRendererName(int rendererIndex)Returns the name of the renderer at a given index.@com.google.android.exoplayer2.trackselection.MappingTrackSelector.MappedTrackInfo.RendererSupport intgetRendererSupport(int rendererIndex)Returns the extent to which a renderer can play the tracks that are mapped to it.@com.google.android.exoplayer2.C.TrackType intgetRendererType(int rendererIndex)Returns the track type that the renderer at a given index handles.TrackGroupArraygetTrackGroups(int rendererIndex)Returns theTrackGroups mapped to the renderer at the specified index.@com.google.android.exoplayer2.C.FormatSupport intgetTrackSupport(int rendererIndex, int groupIndex, int trackIndex)Returns the extent to which an individual track is supported by the renderer.@com.google.android.exoplayer2.trackselection.MappingTrackSelector.MappedTrackInfo.RendererSupport intgetTypeSupport(@com.google.android.exoplayer2.C.TrackType int trackType)Returns the extent to which tracks of a specified type are supported.TrackGroupArraygetUnmappedTrackGroups()ReturnsTrackGroups not mapped to any renderer.
-
-
-
Field Detail
-
RENDERER_SUPPORT_NO_TRACKS
public static final int RENDERER_SUPPORT_NO_TRACKS
The renderer does not have any associated tracks.- See Also:
- Constant Field Values
-
RENDERER_SUPPORT_UNSUPPORTED_TRACKS
public static final int RENDERER_SUPPORT_UNSUPPORTED_TRACKS
The renderer has tracks mapped to it, but all are unsupported. In other words,getTrackSupport(int, int, int)returnsC.FORMAT_UNSUPPORTED_DRM,C.FORMAT_UNSUPPORTED_SUBTYPEorC.FORMAT_UNSUPPORTED_TYPEfor all tracks mapped to the renderer.- See Also:
- Constant Field Values
-
RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS
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,getTrackSupport(int, int, int)returnsC.FORMAT_EXCEEDS_CAPABILITIESfor at least one track mapped to the renderer, but does not returnC.FORMAT_HANDLEDfor any tracks mapped to the renderer.- See Also:
- Constant Field Values
-
RENDERER_SUPPORT_PLAYABLE_TRACKS
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,getTrackSupport(int, int, int)returnsC.FORMAT_HANDLEDfor at least one track mapped to the renderer.- See Also:
- Constant Field Values
-
-
Method Detail
-
getRendererCount
public int getRendererCount()
Returns the number of renderers.
-
getRendererName
public 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()
-
getRendererType
public @com.google.android.exoplayer2.C.TrackType int getRendererType(int rendererIndex)
Returns the track type that the renderer at a given index handles.- Parameters:
rendererIndex- The renderer index.- Returns:
- The
C.TrackTypeof the renderer. - See Also:
Renderer.getTrackType()
-
getTrackGroups
public TrackGroupArray getTrackGroups(int rendererIndex)
Returns theTrackGroups mapped to the renderer at the specified index.- Parameters:
rendererIndex- The renderer index.- Returns:
- The corresponding
TrackGroups.
-
getRendererSupport
@RendererSupport public @com.google.android.exoplayer2.trackselection.MappingTrackSelector.MappedTrackInfo.RendererSupport 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.
-
getTypeSupport
@RendererSupport public @com.google.android.exoplayer2.trackselection.MappingTrackSelector.MappedTrackInfo.RendererSupport int getTypeSupport(@com.google.android.exoplayer2.C.TrackType int trackType)
Returns the extent to which tracks of a specified type are supported. This is the best level of support obtained fromgetRendererSupport(int)for all renderers that handle the specified type. If no such renderers exist thenRENDERER_SUPPORT_NO_TRACKSis returned.- Parameters:
trackType- Thetrack type.- Returns:
- The
MappingTrackSelector.MappedTrackInfo.RendererSupport.
-
getCapabilities
public @com.google.android.exoplayer2.RendererCapabilities.Capabilities int getCapabilities(int rendererIndex, int groupIndex, int trackIndex)Returns theRendererCapabilities.Capabilitiesof 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.
-
getTrackSupport
@FormatSupport public @com.google.android.exoplayer2.C.FormatSupport 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.
-
getAdaptiveSupport
public @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int getAdaptiveSupport(int rendererIndex, int groupIndex, boolean includeCapabilitiesExceededTracks)Returns the extent to which a renderer supports adaptation between supported tracks in a specifiedTrackGroup.Tracks for which
getTrackSupport(int, int, int)returnsC.FORMAT_HANDLEDare always considered. Tracks for whichgetTrackSupport(int, int, int)returnsC.FORMAT_EXCEEDS_CAPABILITIESare also considered ifincludeCapabilitiesExceededTracksis set totrue. Tracks for whichgetTrackSupport(int, int, int)returnsC.FORMAT_UNSUPPORTED_DRM,C.FORMAT_UNSUPPORTED_TYPEorC.FORMAT_UNSUPPORTED_SUBTYPEare 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.
-
getAdaptiveSupport
public @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int getAdaptiveSupport(int rendererIndex, int groupIndex, int[] trackIndices)Returns the extent to which a renderer supports adaptation between specified tracks within aTrackGroup.- Parameters:
rendererIndex- The renderer index.groupIndex- The index of the track group.trackIndices- The indices of the tracks in the track group for which to query support.- Returns:
- The
RendererCapabilities.AdaptiveSupport.
-
getUnmappedTrackGroups
public TrackGroupArray getUnmappedTrackGroups()
ReturnsTrackGroups not mapped to any renderer.
-
-