public final class

TrackSelectionParameters.AudioOffloadPreferences

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.TrackSelectionParameters.AudioOffloadPreferences

Overview

Preferences and constraints for enabling audio offload.

Summary

Fields
public static final intAUDIO_OFFLOAD_MODE_DISABLED

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

public static final intAUDIO_OFFLOAD_MODE_ENABLED

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

public static final intAUDIO_OFFLOAD_MODE_REQUIRED

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

public final intaudioOffloadMode

The preferred offload mode setting for audio playback.

public static final TrackSelectionParameters.AudioOffloadPreferencesDEFAULT

Returns an instance configured with default values.

public final booleanisGaplessSupportRequired

A constraint on enabling offload.

public final booleanisSpeedChangeSupportRequired

A constraint on enabling offload.

Methods
public TrackSelectionParameters.AudioOffloadPreferences.BuilderbuildUpon()

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

public booleanequals(java.lang.Object obj)

public static TrackSelectionParameters.AudioOffloadPreferencesfromBundle(Bundle bundle)

Construct an instance from a produced by TrackSelectionParameters.AudioOffloadPreferences.toBundle().

public inthashCode()

public BundletoBundle()

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

Fields

public static final int AUDIO_OFFLOAD_MODE_REQUIRED

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.

public static final int AUDIO_OFFLOAD_MODE_ENABLED

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

public static final int AUDIO_OFFLOAD_MODE_DISABLED

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.

Returns an instance configured with default values.

public final int audioOffloadMode

The preferred offload mode setting for audio playback.

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.

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.

Methods

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

public boolean equals(java.lang.Object obj)

public int hashCode()

public Bundle toBundle()

public static TrackSelectionParameters.AudioOffloadPreferences fromBundle(Bundle bundle)

Construct an instance from a produced by TrackSelectionParameters.AudioOffloadPreferences.toBundle().