Rabbit-R1/android (non root)/java/sources/androidx/media3/exoplayer/ExoPlayer.java
2024-05-21 17:08:36 -04:00

824 lines
32 KiB
Java

package androidx.media3.exoplayer;
import android.content.Context;
import android.media.AudioDeviceInfo;
import android.os.Looper;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.TextureView;
import androidx.media3.common.AudioAttributes;
import androidx.media3.common.AuxEffectInfo;
import androidx.media3.common.DeviceInfo;
import androidx.media3.common.Effect;
import androidx.media3.common.Format;
import androidx.media3.common.Player;
import androidx.media3.common.PriorityTaskManager;
import androidx.media3.common.VideoSize;
import androidx.media3.common.text.CueGroup;
import androidx.media3.common.util.Assertions;
import androidx.media3.common.util.Clock;
import androidx.media3.common.util.Util;
import androidx.media3.exoplayer.DefaultLivePlaybackSpeedControl;
import androidx.media3.exoplayer.ExoPlayer;
import androidx.media3.exoplayer.PlayerMessage;
import androidx.media3.exoplayer.analytics.AnalyticsCollector;
import androidx.media3.exoplayer.analytics.AnalyticsListener;
import androidx.media3.exoplayer.analytics.DefaultAnalyticsCollector;
import androidx.media3.exoplayer.source.DefaultMediaSourceFactory;
import androidx.media3.exoplayer.source.MediaSource;
import androidx.media3.exoplayer.source.ShuffleOrder;
import androidx.media3.exoplayer.source.TrackGroupArray;
import androidx.media3.exoplayer.trackselection.DefaultTrackSelector;
import androidx.media3.exoplayer.trackselection.TrackSelectionArray;
import androidx.media3.exoplayer.trackselection.TrackSelector;
import androidx.media3.exoplayer.upstream.BandwidthMeter;
import androidx.media3.exoplayer.upstream.DefaultBandwidthMeter;
import androidx.media3.exoplayer.video.VideoFrameMetadataListener;
import androidx.media3.exoplayer.video.spherical.CameraMotionListener;
import androidx.media3.extractor.DefaultExtractorsFactory;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
import java.util.List;
/* loaded from: classes2.dex */
public interface ExoPlayer extends Player {
public static final long DEFAULT_DETACH_SURFACE_TIMEOUT_MS = 2000;
public static final long DEFAULT_RELEASE_TIMEOUT_MS = 500;
@Deprecated
/* loaded from: classes2.dex */
public interface AudioComponent {
@Deprecated
void clearAuxEffectInfo();
@Deprecated
AudioAttributes getAudioAttributes();
@Deprecated
int getAudioSessionId();
@Deprecated
boolean getSkipSilenceEnabled();
@Deprecated
float getVolume();
@Deprecated
void setAudioAttributes(AudioAttributes audioAttributes, boolean z);
@Deprecated
void setAudioSessionId(int i);
@Deprecated
void setAuxEffectInfo(AuxEffectInfo auxEffectInfo);
@Deprecated
void setSkipSilenceEnabled(boolean z);
@Deprecated
void setVolume(float f);
}
/* loaded from: classes2.dex */
public interface AudioOffloadListener {
default void onExperimentalOffloadSchedulingEnabledChanged(boolean z) {
}
default void onExperimentalOffloadedPlayback(boolean z) {
}
default void onExperimentalSleepingForOffloadChanged(boolean z) {
}
}
@Deprecated
/* loaded from: classes2.dex */
public interface DeviceComponent {
@Deprecated
void decreaseDeviceVolume();
@Deprecated
DeviceInfo getDeviceInfo();
@Deprecated
int getDeviceVolume();
@Deprecated
void increaseDeviceVolume();
@Deprecated
boolean isDeviceMuted();
@Deprecated
void setDeviceMuted(boolean z);
@Deprecated
void setDeviceVolume(int i);
}
@Deprecated
/* loaded from: classes2.dex */
public interface TextComponent {
@Deprecated
CueGroup getCurrentCues();
}
@Deprecated
/* loaded from: classes2.dex */
public interface VideoComponent {
@Deprecated
void clearCameraMotionListener(CameraMotionListener cameraMotionListener);
@Deprecated
void clearVideoFrameMetadataListener(VideoFrameMetadataListener videoFrameMetadataListener);
@Deprecated
void clearVideoSurface();
@Deprecated
void clearVideoSurface(Surface surface);
@Deprecated
void clearVideoSurfaceHolder(SurfaceHolder surfaceHolder);
@Deprecated
void clearVideoSurfaceView(SurfaceView surfaceView);
@Deprecated
void clearVideoTextureView(TextureView textureView);
@Deprecated
int getVideoChangeFrameRateStrategy();
@Deprecated
int getVideoScalingMode();
@Deprecated
VideoSize getVideoSize();
@Deprecated
void setCameraMotionListener(CameraMotionListener cameraMotionListener);
@Deprecated
void setVideoChangeFrameRateStrategy(int i);
@Deprecated
void setVideoFrameMetadataListener(VideoFrameMetadataListener videoFrameMetadataListener);
@Deprecated
void setVideoScalingMode(int i);
@Deprecated
void setVideoSurface(Surface surface);
@Deprecated
void setVideoSurfaceHolder(SurfaceHolder surfaceHolder);
@Deprecated
void setVideoSurfaceView(SurfaceView surfaceView);
@Deprecated
void setVideoTextureView(TextureView textureView);
}
void addAnalyticsListener(AnalyticsListener analyticsListener);
void addAudioOffloadListener(AudioOffloadListener audioOffloadListener);
void addMediaSource(int i, MediaSource mediaSource);
void addMediaSource(MediaSource mediaSource);
void addMediaSources(int i, List<MediaSource> list);
void addMediaSources(List<MediaSource> list);
void clearAuxEffectInfo();
void clearCameraMotionListener(CameraMotionListener cameraMotionListener);
void clearVideoFrameMetadataListener(VideoFrameMetadataListener videoFrameMetadataListener);
PlayerMessage createMessage(PlayerMessage.Target target);
boolean experimentalIsSleepingForOffload();
void experimentalSetOffloadSchedulingEnabled(boolean z);
AnalyticsCollector getAnalyticsCollector();
@Deprecated
AudioComponent getAudioComponent();
DecoderCounters getAudioDecoderCounters();
Format getAudioFormat();
int getAudioSessionId();
Clock getClock();
@Deprecated
TrackGroupArray getCurrentTrackGroups();
@Deprecated
TrackSelectionArray getCurrentTrackSelections();
@Deprecated
DeviceComponent getDeviceComponent();
boolean getPauseAtEndOfMediaItems();
Looper getPlaybackLooper();
@Override // androidx.media3.common.Player
ExoPlaybackException getPlayerError();
Renderer getRenderer(int i);
int getRendererCount();
int getRendererType(int i);
SeekParameters getSeekParameters();
boolean getSkipSilenceEnabled();
@Deprecated
TextComponent getTextComponent();
TrackSelector getTrackSelector();
int getVideoChangeFrameRateStrategy();
@Deprecated
VideoComponent getVideoComponent();
DecoderCounters getVideoDecoderCounters();
Format getVideoFormat();
int getVideoScalingMode();
boolean isTunnelingEnabled();
@Deprecated
void prepare(MediaSource mediaSource);
@Deprecated
void prepare(MediaSource mediaSource, boolean z, boolean z2);
void removeAnalyticsListener(AnalyticsListener analyticsListener);
void removeAudioOffloadListener(AudioOffloadListener audioOffloadListener);
void setAudioAttributes(AudioAttributes audioAttributes, boolean z);
void setAudioSessionId(int i);
void setAuxEffectInfo(AuxEffectInfo auxEffectInfo);
void setCameraMotionListener(CameraMotionListener cameraMotionListener);
void setForegroundMode(boolean z);
void setHandleAudioBecomingNoisy(boolean z);
void setMediaSource(MediaSource mediaSource);
void setMediaSource(MediaSource mediaSource, long j);
void setMediaSource(MediaSource mediaSource, boolean z);
void setMediaSources(List<MediaSource> list);
void setMediaSources(List<MediaSource> list, int i, long j);
void setMediaSources(List<MediaSource> list, boolean z);
void setPauseAtEndOfMediaItems(boolean z);
void setPreferredAudioDevice(AudioDeviceInfo audioDeviceInfo);
void setPriorityTaskManager(PriorityTaskManager priorityTaskManager);
void setSeekParameters(SeekParameters seekParameters);
void setShuffleOrder(ShuffleOrder shuffleOrder);
void setSkipSilenceEnabled(boolean z);
void setVideoChangeFrameRateStrategy(int i);
void setVideoEffects(List<Effect> list);
void setVideoFrameMetadataListener(VideoFrameMetadataListener videoFrameMetadataListener);
void setVideoScalingMode(int i);
void setWakeMode(int i);
/* loaded from: classes2.dex */
public static final class Builder {
Function<Clock, AnalyticsCollector> analyticsCollectorFunction;
AudioAttributes audioAttributes;
Supplier<BandwidthMeter> bandwidthMeterSupplier;
boolean buildCalled;
Clock clock;
final Context context;
long detachSurfaceTimeoutMs;
boolean deviceVolumeControlEnabled;
long foregroundModeTimeoutMs;
boolean handleAudioBecomingNoisy;
boolean handleAudioFocus;
LivePlaybackSpeedControl livePlaybackSpeedControl;
Supplier<LoadControl> loadControlSupplier;
Looper looper;
Supplier<MediaSource.Factory> mediaSourceFactorySupplier;
boolean pauseAtEndOfMediaItems;
Looper playbackLooper;
PriorityTaskManager priorityTaskManager;
long releaseTimeoutMs;
Supplier<RenderersFactory> renderersFactorySupplier;
long seekBackIncrementMs;
long seekForwardIncrementMs;
SeekParameters seekParameters;
boolean skipSilenceEnabled;
Supplier<TrackSelector> trackSelectorSupplier;
boolean useLazyPreparation;
boolean usePlatformDiagnostics;
int videoChangeFrameRateStrategy;
int videoScalingMode;
int wakeMode;
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ TrackSelector lambda$new$10(TrackSelector trackSelector) {
return trackSelector;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ LoadControl lambda$new$11(LoadControl loadControl) {
return loadControl;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ BandwidthMeter lambda$new$12(BandwidthMeter bandwidthMeter) {
return bandwidthMeter;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ AnalyticsCollector lambda$new$13(AnalyticsCollector analyticsCollector, Clock clock) {
return analyticsCollector;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ RenderersFactory lambda$new$2(RenderersFactory renderersFactory) {
return renderersFactory;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ MediaSource.Factory lambda$new$5(MediaSource.Factory factory) {
return factory;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ RenderersFactory lambda$new$6(RenderersFactory renderersFactory) {
return renderersFactory;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ MediaSource.Factory lambda$new$7(MediaSource.Factory factory) {
return factory;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ RenderersFactory lambda$new$8(RenderersFactory renderersFactory) {
return renderersFactory;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ MediaSource.Factory lambda$new$9(MediaSource.Factory factory) {
return factory;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ AnalyticsCollector lambda$setAnalyticsCollector$21(AnalyticsCollector analyticsCollector, Clock clock) {
return analyticsCollector;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ BandwidthMeter lambda$setBandwidthMeter$20(BandwidthMeter bandwidthMeter) {
return bandwidthMeter;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ LoadControl lambda$setLoadControl$19(LoadControl loadControl) {
return loadControl;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ MediaSource.Factory lambda$setMediaSourceFactory$17(MediaSource.Factory factory) {
return factory;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ RenderersFactory lambda$setRenderersFactory$16(RenderersFactory renderersFactory) {
return renderersFactory;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ TrackSelector lambda$setTrackSelector$18(TrackSelector trackSelector) {
return trackSelector;
}
public Builder(final Context context) {
this(context, (Supplier<RenderersFactory>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda11
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$0(context);
}
}, (Supplier<MediaSource.Factory>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda16
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$1(context);
}
});
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ RenderersFactory lambda$new$0(Context context) {
return new DefaultRenderersFactory(context);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ MediaSource.Factory lambda$new$1(Context context) {
return new DefaultMediaSourceFactory(context, new DefaultExtractorsFactory());
}
public Builder(final Context context, final RenderersFactory renderersFactory) {
this(context, (Supplier<RenderersFactory>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda6
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$2(RenderersFactory.this);
}
}, (Supplier<MediaSource.Factory>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda7
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$3(context);
}
});
Assertions.checkNotNull(renderersFactory);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ MediaSource.Factory lambda$new$3(Context context) {
return new DefaultMediaSourceFactory(context, new DefaultExtractorsFactory());
}
public Builder(final Context context, final MediaSource.Factory factory) {
this(context, (Supplier<RenderersFactory>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda2
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$4(context);
}
}, (Supplier<MediaSource.Factory>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda3
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$5(MediaSource.Factory.this);
}
});
Assertions.checkNotNull(factory);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ RenderersFactory lambda$new$4(Context context) {
return new DefaultRenderersFactory(context);
}
public Builder(Context context, final RenderersFactory renderersFactory, final MediaSource.Factory factory) {
this(context, (Supplier<RenderersFactory>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda14
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$6(RenderersFactory.this);
}
}, (Supplier<MediaSource.Factory>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda15
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$7(MediaSource.Factory.this);
}
});
Assertions.checkNotNull(renderersFactory);
Assertions.checkNotNull(factory);
}
public Builder(Context context, final RenderersFactory renderersFactory, final MediaSource.Factory factory, final TrackSelector trackSelector, final LoadControl loadControl, final BandwidthMeter bandwidthMeter, final AnalyticsCollector analyticsCollector) {
this(context, (Supplier<RenderersFactory>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda18
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$8(RenderersFactory.this);
}
}, (Supplier<MediaSource.Factory>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda19
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$9(MediaSource.Factory.this);
}
}, (Supplier<TrackSelector>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda20
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$10(TrackSelector.this);
}
}, (Supplier<LoadControl>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda21
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$11(LoadControl.this);
}
}, (Supplier<BandwidthMeter>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda22
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$12(BandwidthMeter.this);
}
}, (Function<Clock, AnalyticsCollector>) new Function() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda23
@Override // com.google.common.base.Function
public final Object apply(Object obj) {
return ExoPlayer.Builder.lambda$new$13(AnalyticsCollector.this, (Clock) obj);
}
});
Assertions.checkNotNull(renderersFactory);
Assertions.checkNotNull(factory);
Assertions.checkNotNull(trackSelector);
Assertions.checkNotNull(bandwidthMeter);
Assertions.checkNotNull(analyticsCollector);
}
private Builder(final Context context, Supplier<RenderersFactory> supplier, Supplier<MediaSource.Factory> supplier2) {
this(context, supplier, supplier2, (Supplier<TrackSelector>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda9
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$new$14(context);
}
}, (Supplier<LoadControl>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda10
@Override // com.google.common.base.Supplier
public final Object get() {
return new DefaultLoadControl();
}
}, (Supplier<BandwidthMeter>) new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda12
@Override // com.google.common.base.Supplier
public final Object get() {
BandwidthMeter singletonInstance;
singletonInstance = DefaultBandwidthMeter.getSingletonInstance(context);
return singletonInstance;
}
}, (Function<Clock, AnalyticsCollector>) new Function() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda13
@Override // com.google.common.base.Function
public final Object apply(Object obj) {
return new DefaultAnalyticsCollector((Clock) obj);
}
});
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ TrackSelector lambda$new$14(Context context) {
return new DefaultTrackSelector(context);
}
private Builder(Context context, Supplier<RenderersFactory> supplier, Supplier<MediaSource.Factory> supplier2, Supplier<TrackSelector> supplier3, Supplier<LoadControl> supplier4, Supplier<BandwidthMeter> supplier5, Function<Clock, AnalyticsCollector> function) {
this.context = (Context) Assertions.checkNotNull(context);
this.renderersFactorySupplier = supplier;
this.mediaSourceFactorySupplier = supplier2;
this.trackSelectorSupplier = supplier3;
this.loadControlSupplier = supplier4;
this.bandwidthMeterSupplier = supplier5;
this.analyticsCollectorFunction = function;
this.looper = Util.getCurrentOrMainLooper();
this.audioAttributes = AudioAttributes.DEFAULT;
this.wakeMode = 0;
this.videoScalingMode = 1;
this.videoChangeFrameRateStrategy = 0;
this.useLazyPreparation = true;
this.seekParameters = SeekParameters.DEFAULT;
this.seekBackIncrementMs = 5000L;
this.seekForwardIncrementMs = 15000L;
this.livePlaybackSpeedControl = new DefaultLivePlaybackSpeedControl.Builder().build();
this.clock = Clock.DEFAULT;
this.releaseTimeoutMs = 500L;
this.detachSurfaceTimeoutMs = 2000L;
this.usePlatformDiagnostics = true;
}
public Builder experimentalSetForegroundModeTimeoutMs(long j) {
Assertions.checkState(!this.buildCalled);
this.foregroundModeTimeoutMs = j;
return this;
}
public Builder setRenderersFactory(final RenderersFactory renderersFactory) {
Assertions.checkState(!this.buildCalled);
Assertions.checkNotNull(renderersFactory);
this.renderersFactorySupplier = new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda17
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$setRenderersFactory$16(RenderersFactory.this);
}
};
return this;
}
public Builder setMediaSourceFactory(final MediaSource.Factory factory) {
Assertions.checkState(!this.buildCalled);
Assertions.checkNotNull(factory);
this.mediaSourceFactorySupplier = new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda5
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$setMediaSourceFactory$17(MediaSource.Factory.this);
}
};
return this;
}
public Builder setTrackSelector(final TrackSelector trackSelector) {
Assertions.checkState(!this.buildCalled);
Assertions.checkNotNull(trackSelector);
this.trackSelectorSupplier = new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda4
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$setTrackSelector$18(TrackSelector.this);
}
};
return this;
}
public Builder setLoadControl(final LoadControl loadControl) {
Assertions.checkState(!this.buildCalled);
Assertions.checkNotNull(loadControl);
this.loadControlSupplier = new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda0
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$setLoadControl$19(LoadControl.this);
}
};
return this;
}
public Builder setBandwidthMeter(final BandwidthMeter bandwidthMeter) {
Assertions.checkState(!this.buildCalled);
Assertions.checkNotNull(bandwidthMeter);
this.bandwidthMeterSupplier = new Supplier() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda1
@Override // com.google.common.base.Supplier
public final Object get() {
return ExoPlayer.Builder.lambda$setBandwidthMeter$20(BandwidthMeter.this);
}
};
return this;
}
public Builder setLooper(Looper looper) {
Assertions.checkState(!this.buildCalled);
Assertions.checkNotNull(looper);
this.looper = looper;
return this;
}
public Builder setAnalyticsCollector(final AnalyticsCollector analyticsCollector) {
Assertions.checkState(!this.buildCalled);
Assertions.checkNotNull(analyticsCollector);
this.analyticsCollectorFunction = new Function() { // from class: androidx.media3.exoplayer.ExoPlayer$Builder$$ExternalSyntheticLambda8
@Override // com.google.common.base.Function
public final Object apply(Object obj) {
return ExoPlayer.Builder.lambda$setAnalyticsCollector$21(AnalyticsCollector.this, (Clock) obj);
}
};
return this;
}
public Builder setPriorityTaskManager(PriorityTaskManager priorityTaskManager) {
Assertions.checkState(!this.buildCalled);
this.priorityTaskManager = priorityTaskManager;
return this;
}
public Builder setAudioAttributes(AudioAttributes audioAttributes, boolean z) {
Assertions.checkState(!this.buildCalled);
this.audioAttributes = (AudioAttributes) Assertions.checkNotNull(audioAttributes);
this.handleAudioFocus = z;
return this;
}
public Builder setWakeMode(int i) {
Assertions.checkState(!this.buildCalled);
this.wakeMode = i;
return this;
}
public Builder setHandleAudioBecomingNoisy(boolean z) {
Assertions.checkState(!this.buildCalled);
this.handleAudioBecomingNoisy = z;
return this;
}
public Builder setSkipSilenceEnabled(boolean z) {
Assertions.checkState(!this.buildCalled);
this.skipSilenceEnabled = z;
return this;
}
public Builder setDeviceVolumeControlEnabled(boolean z) {
Assertions.checkState(!this.buildCalled);
this.deviceVolumeControlEnabled = z;
return this;
}
public Builder setVideoScalingMode(int i) {
Assertions.checkState(!this.buildCalled);
this.videoScalingMode = i;
return this;
}
public Builder setVideoChangeFrameRateStrategy(int i) {
Assertions.checkState(!this.buildCalled);
this.videoChangeFrameRateStrategy = i;
return this;
}
public Builder setUseLazyPreparation(boolean z) {
Assertions.checkState(!this.buildCalled);
this.useLazyPreparation = z;
return this;
}
public Builder setSeekParameters(SeekParameters seekParameters) {
Assertions.checkState(!this.buildCalled);
this.seekParameters = (SeekParameters) Assertions.checkNotNull(seekParameters);
return this;
}
public Builder setSeekBackIncrementMs(long j) {
Assertions.checkArgument(j > 0);
Assertions.checkState(!this.buildCalled);
this.seekBackIncrementMs = j;
return this;
}
public Builder setSeekForwardIncrementMs(long j) {
Assertions.checkArgument(j > 0);
Assertions.checkState(!this.buildCalled);
this.seekForwardIncrementMs = j;
return this;
}
public Builder setReleaseTimeoutMs(long j) {
Assertions.checkState(!this.buildCalled);
this.releaseTimeoutMs = j;
return this;
}
public Builder setDetachSurfaceTimeoutMs(long j) {
Assertions.checkState(!this.buildCalled);
this.detachSurfaceTimeoutMs = j;
return this;
}
public Builder setPauseAtEndOfMediaItems(boolean z) {
Assertions.checkState(!this.buildCalled);
this.pauseAtEndOfMediaItems = z;
return this;
}
public Builder setLivePlaybackSpeedControl(LivePlaybackSpeedControl livePlaybackSpeedControl) {
Assertions.checkState(!this.buildCalled);
this.livePlaybackSpeedControl = (LivePlaybackSpeedControl) Assertions.checkNotNull(livePlaybackSpeedControl);
return this;
}
public Builder setUsePlatformDiagnostics(boolean z) {
Assertions.checkState(!this.buildCalled);
this.usePlatformDiagnostics = z;
return this;
}
public Builder setClock(Clock clock) {
Assertions.checkState(!this.buildCalled);
this.clock = clock;
return this;
}
public Builder setPlaybackLooper(Looper looper) {
Assertions.checkState(!this.buildCalled);
this.playbackLooper = looper;
return this;
}
public ExoPlayer build() {
Assertions.checkState(!this.buildCalled);
this.buildCalled = true;
return new ExoPlayerImpl(this, null);
}
/* JADX INFO: Access modifiers changed from: package-private */
public SimpleExoPlayer buildSimpleExoPlayer() {
Assertions.checkState(!this.buildCalled);
this.buildCalled = true;
return new SimpleExoPlayer(this);
}
}
}