Class DefaultTrackSelector.Parameters
- java.lang.Object
-
- com.google.android.exoplayer2.trackselection.TrackSelectionParameters
-
- com.google.android.exoplayer2.trackselection.DefaultTrackSelector.Parameters
-
- All Implemented Interfaces:
Bundleable
- Enclosing class:
- DefaultTrackSelector
public static final class DefaultTrackSelector.Parameters extends TrackSelectionParameters implements Bundleable
ExtendsDefaultTrackSelector.Parametersby adding fields that are specific toDefaultTrackSelector.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultTrackSelector.Parameters.BuilderA builder forDefaultTrackSelector.Parameters.-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description booleanallowAudioMixedChannelCountAdaptivenessWhether to allow adaptive audio selections containing mixed channel counts.booleanallowAudioMixedDecoderSupportAdaptivenessWhether to allow adaptive audio selections with mixed levels ofRendererCapabilities.DecoderSupportandRendererCapabilities.HardwareAccelerationSupport.booleanallowAudioMixedMimeTypeAdaptivenessWhether to allow adaptive audio selections containing mixed MIME types.booleanallowAudioMixedSampleRateAdaptivenessWhether to allow adaptive audio selections containing mixed sample rates.booleanallowInvalidateSelectionsOnRendererCapabilitiesChangeWhether to allow to invalidate selections on renderer capabilities change.booleanallowMultipleAdaptiveSelectionsWhether multiple adaptive selections with more than one track are allowed.booleanallowVideoMixedDecoderSupportAdaptivenessWhether to allow adaptive video selections with mixed levels ofRendererCapabilities.DecoderSupportandRendererCapabilities.HardwareAccelerationSupport.booleanallowVideoMixedMimeTypeAdaptivenessWhether to allow adaptive video selections containing mixed MIME types.booleanallowVideoNonSeamlessAdaptivenessWhether to allow adaptive video selections where adaptation may not be completely seamless.booleanconstrainAudioChannelCountToDeviceCapabilitiesWhether to constrain audio track selection so that the selected track's channel count does not exceed the device's output capabilities.static Bundleable.Creator<DefaultTrackSelector.Parameters>CREATORObject that can restoreParametersfrom aBundle.static DefaultTrackSelector.ParametersDEFAULTDeprecated.This instance is not configured usingContextconstraints.static DefaultTrackSelector.ParametersDEFAULT_WITHOUT_CONTEXTAn instance with default values, except those obtained from theContext.booleanexceedAudioConstraintsIfNecessaryWhether to exceed theTrackSelectionParameters.maxAudioChannelCountandTrackSelectionParameters.maxAudioBitrateconstraints when no selection can be made otherwise.booleanexceedRendererCapabilitiesIfNecessaryWhether to exceed renderer capabilities when no selection can be made otherwise.booleanexceedVideoConstraintsIfNecessaryWhether to exceed theTrackSelectionParameters.maxVideoWidth,TrackSelectionParameters.maxVideoHeightandTrackSelectionParameters.maxVideoBitrateconstraints when no selection can be made otherwise.booleantunnelingEnabledWhether to enable tunneling if possible.-
Fields inherited from class com.google.android.exoplayer2.trackselection.TrackSelectionParameters
disabledTrackTypes, FIELD_CUSTOM_ID_BASE, forceHighestSupportedBitrate, forceLowestBitrate, ignoredTextSelectionFlags, maxAudioBitrate, maxAudioChannelCount, maxVideoBitrate, maxVideoFrameRate, maxVideoHeight, maxVideoWidth, minVideoBitrate, minVideoFrameRate, minVideoHeight, minVideoWidth, overrides, preferredAudioLanguages, preferredAudioMimeTypes, preferredAudioRoleFlags, preferredTextLanguages, preferredTextRoleFlags, preferredVideoMimeTypes, preferredVideoRoleFlags, selectUndeterminedTextLanguage, viewportHeight, viewportOrientationMayChange, viewportWidth
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DefaultTrackSelector.Parameters.BuilderbuildUpon()Creates a newDefaultTrackSelector.Parameters.Builder, copying the initial values from this instance.booleanequals(Object obj)static DefaultTrackSelector.ParametersgetDefaults(Context context)Returns an instance configured with default values.booleangetRendererDisabled(int rendererIndex)Returns whether the renderer is disabled.DefaultTrackSelector.SelectionOverridegetSelectionOverride(int rendererIndex, TrackGroupArray groups)Deprecated.Only works to retrieve the overrides set with the deprecatedDefaultTrackSelector.Parameters.Builder.setSelectionOverride(int, TrackGroupArray, SelectionOverride).inthashCode()booleanhasSelectionOverride(int rendererIndex, TrackGroupArray groups)Deprecated.Only works to retrieve the overrides set with the deprecatedDefaultTrackSelector.Parameters.Builder.setSelectionOverride(int, TrackGroupArray, SelectionOverride).BundletoBundle()Returns aBundlerepresenting the information stored in this object.-
Methods inherited from class com.google.android.exoplayer2.trackselection.TrackSelectionParameters
fromBundle
-
-
-
-
Field Detail
-
DEFAULT_WITHOUT_CONTEXT
public static final DefaultTrackSelector.Parameters DEFAULT_WITHOUT_CONTEXT
An instance with default values, except those obtained from theContext.If possible, use
getDefaults(Context)instead.This instance will not have the following settings:
- Viewport constraints configured for the primary display.
- Preferred text language and role flags configured to the accessibility settings of
CaptioningManager.
-
DEFAULT
@Deprecated public static final DefaultTrackSelector.Parameters DEFAULT
Deprecated.This instance is not configured usingContextconstraints. UsegetDefaults(Context)instead.
-
exceedVideoConstraintsIfNecessary
public final boolean exceedVideoConstraintsIfNecessary
Whether to exceed theTrackSelectionParameters.maxVideoWidth,TrackSelectionParameters.maxVideoHeightandTrackSelectionParameters.maxVideoBitrateconstraints when no selection can be made otherwise. The default value istrue.
-
allowVideoMixedMimeTypeAdaptiveness
public final boolean allowVideoMixedMimeTypeAdaptiveness
Whether to allow adaptive video selections containing mixed MIME types. Adaptations between different MIME types may not be completely seamless, in which caseallowVideoNonSeamlessAdaptivenessalso needs to betruefor mixed MIME type selections to be made. The default value isfalse.
-
allowVideoNonSeamlessAdaptiveness
public final boolean allowVideoNonSeamlessAdaptiveness
Whether to allow adaptive video selections where adaptation may not be completely seamless. The default value istrue.
-
allowVideoMixedDecoderSupportAdaptiveness
public final boolean allowVideoMixedDecoderSupportAdaptiveness
Whether to allow adaptive video selections with mixed levels ofRendererCapabilities.DecoderSupportandRendererCapabilities.HardwareAccelerationSupport.
-
exceedAudioConstraintsIfNecessary
public final boolean exceedAudioConstraintsIfNecessary
Whether to exceed theTrackSelectionParameters.maxAudioChannelCountandTrackSelectionParameters.maxAudioBitrateconstraints when no selection can be made otherwise. The default value istrue.
-
allowAudioMixedMimeTypeAdaptiveness
public final boolean allowAudioMixedMimeTypeAdaptiveness
Whether to allow adaptive audio selections containing mixed MIME types. Adaptations between different MIME types may not be completely seamless. The default value isfalse.
-
allowAudioMixedSampleRateAdaptiveness
public final boolean allowAudioMixedSampleRateAdaptiveness
Whether to allow adaptive audio selections containing mixed sample rates. Adaptations between different sample rates may not be completely seamless. The default value isfalse.
-
allowAudioMixedChannelCountAdaptiveness
public final boolean allowAudioMixedChannelCountAdaptiveness
Whether to allow adaptive audio selections containing mixed channel counts. Adaptations between different channel counts may not be completely seamless. The default value isfalse.
-
allowAudioMixedDecoderSupportAdaptiveness
public final boolean allowAudioMixedDecoderSupportAdaptiveness
Whether to allow adaptive audio selections with mixed levels ofRendererCapabilities.DecoderSupportandRendererCapabilities.HardwareAccelerationSupport.
-
constrainAudioChannelCountToDeviceCapabilities
public final boolean constrainAudioChannelCountToDeviceCapabilities
Whether to constrain audio track selection so that the selected track's channel count does not exceed the device's output capabilities. The default value istrue.
-
exceedRendererCapabilitiesIfNecessary
public final boolean exceedRendererCapabilitiesIfNecessary
Whether to exceed renderer capabilities when no selection can be made otherwise.This parameter applies when all of the tracks available for a renderer exceed the renderer's reported capabilities. If the parameter is
truethen the lowest quality track will still be selected. Playback may succeed if the renderer has under-reported its true capabilities. Iffalsethen no track will be selected. The default value istrue.
-
tunnelingEnabled
public final boolean tunnelingEnabled
Whether to enable tunneling if possible.
-
allowMultipleAdaptiveSelections
public final boolean allowMultipleAdaptiveSelections
Whether multiple adaptive selections with more than one track are allowed. The default value istrue.Note that tracks are only eligible for adaptation if they define a bitrate, the renderers support the tracks and allow adaptation between them, and they are not excluded based on other track selection parameters.
-
allowInvalidateSelectionsOnRendererCapabilitiesChange
public final boolean allowInvalidateSelectionsOnRendererCapabilitiesChange
Whether to allow to invalidate selections on renderer capabilities change. The default value isfalse.
-
CREATOR
public static final Bundleable.Creator<DefaultTrackSelector.Parameters> CREATOR
Object that can restoreParametersfrom aBundle.
-
-
Method Detail
-
getDefaults
public static DefaultTrackSelector.Parameters getDefaults(Context context)
Returns an instance configured with default values.
-
getRendererDisabled
public boolean getRendererDisabled(int rendererIndex)
Returns whether the renderer is disabled.- Parameters:
rendererIndex- The renderer index.- Returns:
- Whether the renderer is disabled.
-
hasSelectionOverride
@Deprecated public boolean hasSelectionOverride(int rendererIndex, TrackGroupArray groups)
Deprecated.Only works to retrieve the overrides set with the deprecatedDefaultTrackSelector.Parameters.Builder.setSelectionOverride(int, TrackGroupArray, SelectionOverride). UseTrackSelectionParameters.overridesinstead.Returns whether there is an override for the specified renderer andTrackGroupArray.- Parameters:
rendererIndex- The renderer index.groups- TheTrackGroupArray.- Returns:
- Whether there is an override.
-
getSelectionOverride
@Deprecated @Nullable public DefaultTrackSelector.SelectionOverride getSelectionOverride(int rendererIndex, TrackGroupArray groups)
Deprecated.Only works to retrieve the overrides set with the deprecatedDefaultTrackSelector.Parameters.Builder.setSelectionOverride(int, TrackGroupArray, SelectionOverride). UseTrackSelectionParameters.overridesinstead.Returns the override for the specified renderer andTrackGroupArray.- Parameters:
rendererIndex- The renderer index.groups- TheTrackGroupArray.- Returns:
- The override, or null if no override exists.
-
buildUpon
public DefaultTrackSelector.Parameters.Builder buildUpon()
Creates a newDefaultTrackSelector.Parameters.Builder, copying the initial values from this instance.- Overrides:
buildUponin classTrackSelectionParameters
-
equals
public boolean equals(@Nullable Object obj)- Overrides:
equalsin classTrackSelectionParameters
-
hashCode
public int hashCode()
- Overrides:
hashCodein classTrackSelectionParameters
-
toBundle
public Bundle toBundle()
Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
toBundlein interfaceBundleable- Overrides:
toBundlein classTrackSelectionParameters
-
-