TrackSelectionParameters.AudioOffloadPreferences


@UnstableApi
public final class TrackSelectionParameters.AudioOffloadPreferences implements Bundleable


Preferences and constraints for enabling audio offload.

Summary

Nested types

@Documented
@Retention(value = SOURCE)
@Target(value = TYPE_USE)
@IntDef(value = )
public annotation TrackSelectionParameters.AudioOffloadPreferences.AudioOffloadMode

The preference level for enabling audio offload on the audio sink.

A builder for AudioOffloadPreferences.

Constants

static final int

The track selector will disable audio offload on the audio sink.

static final int

The track selector will enable audio offload if the selected tracks and renderer capabilities are compatible.

static final int

The track selector will only select tracks that with the renderer capabilities provide an audio offload compatible playback scenario.

static final TrackSelectionParameters.AudioOffloadPreferences

Returns an instance configured with default values.

Public fields

final int

The preferred offload mode setting for audio playback.

final boolean

A constraint on enabling offload.

final boolean

A constraint on enabling offload.

Public methods

TrackSelectionParameters.AudioOffloadPreferences.Builder

Creates a new AudioOffloadPreferences.Builder, copying the initial values from this instance.

boolean
static TrackSelectionParameters.AudioOffloadPreferences

Construct an instance from a Bundle produced by toBundle.

int
Bundle

Returns a Bundle representing the information stored in this object.

Constants

AUDIO_OFFLOAD_MODE_DISABLED

public static final int AUDIO_OFFLOAD_MODE_DISABLED = 0

The track selector will disable audio offload on the audio sink. Track selection will not take into consideration whether or not a track is offload compatible.

AUDIO_OFFLOAD_MODE_ENABLED

public static final int AUDIO_OFFLOAD_MODE_ENABLED = 1

The track selector will enable audio offload if the selected tracks and renderer capabilities are compatible.

AUDIO_OFFLOAD_MODE_REQUIRED

public static final int AUDIO_OFFLOAD_MODE_REQUIRED = 2

The track selector will only select tracks that with the renderer capabilities provide an audio offload compatible playback scenario. If it is impossible to create an offload-compatible track selection, then no tracks will be selected.

DEFAULT

public static final TrackSelectionParameters.AudioOffloadPreferences DEFAULT

Returns an instance configured with default values.

Public fields

audioOffloadMode

@TrackSelectionParameters.AudioOffloadPreferences.AudioOffloadMode
public final int audioOffloadMode

The preferred offload mode setting for audio playback.

isGaplessSupportRequired

public final boolean isGaplessSupportRequired

A constraint on enabling offload. If true, then audio offload will be enabled only if the device supports gapless transitions during offload or the selected audio is not gapless.

isSpeedChangeSupportRequired

public final boolean isSpeedChangeSupportRequired

A constraint on enabling offload. If true, then audio offload will be enabled only if the device supports changing playback speed during offload.

Public methods

buildUpon

public TrackSelectionParameters.AudioOffloadPreferences.Builder buildUpon()

Creates a new AudioOffloadPreferences.Builder, copying the initial values from this instance.

equals

public boolean equals(@Nullable Object obj)

fromBundle

public static TrackSelectionParameters.AudioOffloadPreferences fromBundle(Bundle bundle)

Construct an instance from a Bundle produced by toBundle.

hashCode

public int hashCode()

toBundle

public Bundle toBundle()

Returns a Bundle representing the information stored in this object.