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

79 lines
2.8 KiB
Java

package androidx.media3.exoplayer.trackselection;
import androidx.media3.common.AudioAttributes;
import androidx.media3.common.Timeline;
import androidx.media3.common.TrackSelectionParameters;
import androidx.media3.common.util.Assertions;
import androidx.media3.exoplayer.ExoPlaybackException;
import androidx.media3.exoplayer.Renderer;
import androidx.media3.exoplayer.RendererCapabilities;
import androidx.media3.exoplayer.source.MediaSource;
import androidx.media3.exoplayer.source.TrackGroupArray;
import androidx.media3.exoplayer.upstream.BandwidthMeter;
/* loaded from: classes2.dex */
public abstract class TrackSelector {
private BandwidthMeter bandwidthMeter;
private InvalidationListener listener;
/* loaded from: classes2.dex */
public interface InvalidationListener {
default void onRendererCapabilitiesChanged(Renderer renderer) {
}
void onTrackSelectionsInvalidated();
}
public RendererCapabilities.Listener getRendererCapabilitiesListener() {
return null;
}
public void init(InvalidationListener invalidationListener, BandwidthMeter bandwidthMeter) {
this.listener = invalidationListener;
this.bandwidthMeter = bandwidthMeter;
}
public boolean isSetParametersSupported() {
return false;
}
public abstract void onSelectionActivated(Object obj);
public void release() {
this.listener = null;
this.bandwidthMeter = null;
}
public abstract TrackSelectorResult selectTracks(RendererCapabilities[] rendererCapabilitiesArr, TrackGroupArray trackGroupArray, MediaSource.MediaPeriodId mediaPeriodId, Timeline timeline) throws ExoPlaybackException;
public void setAudioAttributes(AudioAttributes audioAttributes) {
}
public void setParameters(TrackSelectionParameters trackSelectionParameters) {
}
public TrackSelectionParameters getParameters() {
return TrackSelectionParameters.DEFAULT_WITHOUT_CONTEXT;
}
/* JADX INFO: Access modifiers changed from: protected */
public final void invalidate() {
InvalidationListener invalidationListener = this.listener;
if (invalidationListener != null) {
invalidationListener.onTrackSelectionsInvalidated();
}
}
/* JADX INFO: Access modifiers changed from: protected */
public final void invalidateForRendererCapabilitiesChange(Renderer renderer) {
InvalidationListener invalidationListener = this.listener;
if (invalidationListener != null) {
invalidationListener.onRendererCapabilitiesChanged(renderer);
}
}
/* JADX INFO: Access modifiers changed from: protected */
public final BandwidthMeter getBandwidthMeter() {
return (BandwidthMeter) Assertions.checkStateNotNull(this.bandwidthMeter);
}
}