public static final class DefaultTrackSelector.Parameters
extends java.lang.Object
implements android.os.Parcelable
DefaultTrackSelector
.Modifier and Type | Field and Description |
---|---|
boolean |
allowMixedMimeAdaptiveness
Whether to allow adaptive selections containing mixed mime types.
|
boolean |
allowNonSeamlessAdaptiveness
Whether to allow adaptive selections where adaptation may not be completely seamless.
|
static android.os.Parcelable.Creator<DefaultTrackSelector.Parameters> |
CREATOR |
static DefaultTrackSelector.Parameters |
DEFAULT
An instance with default values.
|
int |
disabledTextTrackSelectionFlags
Bitmask of selection flags that are disabled for text track selections.
|
boolean |
exceedRendererCapabilitiesIfNecessary
Whether to exceed renderer capabilities when no selection can be made otherwise.
|
boolean |
exceedVideoConstraintsIfNecessary
Whether to exceed the
maxVideoWidth , maxVideoHeight and maxVideoBitrate constraints when no selection can be made otherwise. |
boolean |
forceHighestSupportedBitrate
Whether to force selection of the highest bitrate audio and video tracks that comply with all
other constraints.
|
boolean |
forceLowestBitrate
Whether to force selection of the single lowest bitrate audio and video tracks that comply
with all other constraints.
|
int |
maxVideoBitrate
Maximum video bitrate.
|
int |
maxVideoFrameRate
Maximum allowed video frame rate.
|
int |
maxVideoHeight
Maximum allowed video height.
|
int |
maxVideoWidth
Maximum allowed video width.
|
java.lang.String |
preferredAudioLanguage
The preferred language for audio and forced text tracks, as an ISO 639-2/T tag.
|
java.lang.String |
preferredTextLanguage
The preferred language for text tracks as an ISO 639-2/T tag.
|
boolean |
selectUndeterminedTextLanguage
Whether a text track with undetermined language should be selected if no track with
preferredTextLanguage is available, or if preferredTextLanguage is unset. |
int |
tunnelingAudioSessionId
The audio session id to use when tunneling, or
C.AUDIO_SESSION_ID_UNSET if tunneling
is disabled. |
int |
viewportHeight
Viewport height in pixels.
|
boolean |
viewportOrientationMayChange
Whether the viewport orientation may change during playback.
|
int |
viewportWidth
Viewport width in pixels.
|
Modifier and Type | Method and Description |
---|---|
DefaultTrackSelector.ParametersBuilder |
buildUpon()
Creates a new
DefaultTrackSelector.ParametersBuilder , copying the initial values from this instance. |
int |
describeContents() |
boolean |
equals(java.lang.Object obj) |
boolean |
getRendererDisabled(int rendererIndex)
Returns whether the renderer is disabled.
|
DefaultTrackSelector.SelectionOverride |
getSelectionOverride(int rendererIndex,
TrackGroupArray groups)
Returns the override for the specified renderer and
TrackGroupArray . |
int |
hashCode() |
boolean |
hasSelectionOverride(int rendererIndex,
TrackGroupArray groups)
Returns whether there is an override for the specified renderer and
TrackGroupArray . |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final DefaultTrackSelector.Parameters DEFAULT
@Nullable public final java.lang.String preferredAudioLanguage
null
selects the default track, or the first track if there's no default. The default value is
null
.@Nullable public final java.lang.String preferredTextLanguage
null
selects the
default track if there is one, or no track otherwise. The default value is null
.public final boolean selectUndeterminedTextLanguage
preferredTextLanguage
is available, or if preferredTextLanguage
is unset. The
default value is false
.public final int disabledTextTrackSelectionFlags
C.SelectionFlags
. The default value is 0
(i.e. no flags).public final int maxVideoWidth
Integer.MAX_VALUE
(i.e. no
constraint).
To constrain adaptive video track selections to be suitable for a given viewport (the
region of the display within which video will be played), use (viewportWidth
, viewportHeight
and viewportOrientationMayChange
) instead.
public final int maxVideoHeight
Integer.MAX_VALUE
(i.e. no
constraint).
To constrain adaptive video track selections to be suitable for a given viewport (the
region of the display within which video will be played), use (viewportWidth
, viewportHeight
and viewportOrientationMayChange
) instead.
public final int maxVideoFrameRate
Integer.MAX_VALUE
(i.e. no
constraint).public final int maxVideoBitrate
Integer.MAX_VALUE
(i.e. no constraint).public final boolean exceedVideoConstraintsIfNecessary
maxVideoWidth
, maxVideoHeight
and maxVideoBitrate
constraints when no selection can be made otherwise. The default value is
true
.public final int viewportWidth
Integer.MAX_VALUE
(i.e. no constraint).public final int viewportHeight
Integer.MAX_VALUE
(i.e. no constraint).public final boolean viewportOrientationMayChange
true
.public final boolean forceLowestBitrate
false
.public final boolean forceHighestSupportedBitrate
false
.public final boolean allowMixedMimeAdaptiveness
false
.public final boolean allowNonSeamlessAdaptiveness
true
.public final boolean exceedRendererCapabilitiesIfNecessary
This parameter applies when all of the tracks available for a renderer exceed the
renderer's reported capabilities. If the parameter is true
then the lowest quality
track will still be selected. Playback may succeed if the renderer has under-reported its
true capabilities. If false
then no track will be selected. The default value is
true
.
public final int tunnelingAudioSessionId
C.AUDIO_SESSION_ID_UNSET
if tunneling
is disabled. The default value is C.AUDIO_SESSION_ID_UNSET
(i.e. tunneling is
disabled).public static final android.os.Parcelable.Creator<DefaultTrackSelector.Parameters> CREATOR
public final boolean getRendererDisabled(int rendererIndex)
rendererIndex
- The renderer index.public final boolean hasSelectionOverride(int rendererIndex, TrackGroupArray groups)
TrackGroupArray
.rendererIndex
- The renderer index.groups
- The TrackGroupArray
.@Nullable public final DefaultTrackSelector.SelectionOverride getSelectionOverride(int rendererIndex, TrackGroupArray groups)
TrackGroupArray
.rendererIndex
- The renderer index.groups
- The TrackGroupArray
.public DefaultTrackSelector.ParametersBuilder buildUpon()
DefaultTrackSelector.ParametersBuilder
, copying the initial values from this instance.public boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable