1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-22 02:53:09 +01:00

Merge pull request #6294 from Redirion/exodowngrade

Downgrade ExoPlayer to 2.12
This commit is contained in:
Tobi 2021-05-15 10:58:41 +02:00 committed by GitHub
commit 5eb5dbddde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 15 deletions

View File

@ -105,7 +105,7 @@ ext {
androidxRoomVersion = '2.3.0-alpha03'
icepickVersion = '3.2.0'
exoPlayerVersion = '2.13.3'
exoPlayerVersion = '2.12.3'
googleAutoServiceVersion = '1.0-rc7'
groupieVersion = '2.8.1'
markwonVersion = '4.6.0'

View File

@ -500,8 +500,8 @@ public final class Player implements
Log.d(TAG, "[" + Util.DEVICE_DEBUG_INFO + "] "
+ "media tunneling disabled in debug preferences");
} else if (DeviceUtils.shouldSupportMediaTunneling()) {
trackSelector.setParameters(
trackSelector.buildUponParameters().setTunnelingEnabled(true));
trackSelector.setParameters(trackSelector.buildUponParameters()
.setTunnelingAudioSessionId(C.generateAudioSessionIdV21(context)));
} else if (DEBUG) {
Log.d(TAG, "[" + Util.DEVICE_DEBUG_INFO + "] does not support media tunneling");
}

View File

@ -148,7 +148,7 @@ public class AudioReactor implements AudioManager.OnAudioFocusChangeListener, An
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onAudioSessionIdChanged(final EventTime eventTime, final int audioSessionId) {
public void onAudioSessionId(final EventTime eventTime, final int audioSessionId) {
if (!PlayerHelper.isUsingDSP()) {
return;
}

View File

@ -4,7 +4,7 @@ import com.google.android.exoplayer2.DefaultLoadControl;
import com.google.android.exoplayer2.LoadControl;
import com.google.android.exoplayer2.Renderer;
import com.google.android.exoplayer2.source.TrackGroupArray;
import com.google.android.exoplayer2.trackselection.ExoTrackSelection;
import com.google.android.exoplayer2.trackselection.TrackSelectionArray;
import com.google.android.exoplayer2.upstream.Allocator;
public class LoadController implements LoadControl {
@ -48,7 +48,7 @@ public class LoadController implements LoadControl {
@Override
public void onTracksSelected(final Renderer[] renderers, final TrackGroupArray trackGroups,
final ExoTrackSelection[] trackSelections) {
final TrackSelectionArray trackSelections) {
internalLoadControl.onTracksSelected(renderers, trackGroups, trackSelections);
}
@ -92,12 +92,11 @@ public class LoadController implements LoadControl {
@Override
public boolean shouldStartPlayback(final long bufferedDurationUs, final float playbackSpeed,
final boolean rebuffering, final long targetLiveOffsetUs) {
final boolean rebuffering) {
final boolean isInitialPlaybackBufferFilled
= bufferedDurationUs >= this.initialPlaybackBufferUs * playbackSpeed;
final boolean isInternalStartingPlayback = internalLoadControl
.shouldStartPlayback(bufferedDurationUs, playbackSpeed, rebuffering,
targetLiveOffsetUs);
.shouldStartPlayback(bufferedDurationUs, playbackSpeed, rebuffering);
return isInitialPlaybackBufferFilled || isInternalStartingPlayback;
}

View File

@ -23,7 +23,7 @@ import com.google.android.exoplayer2.Player.RepeatMode;
import com.google.android.exoplayer2.SeekParameters;
import com.google.android.exoplayer2.text.CaptionStyleCompat;
import com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection;
import com.google.android.exoplayer2.trackselection.ExoTrackSelection;
import com.google.android.exoplayer2.trackselection.TrackSelection;
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout.ResizeMode;
import com.google.android.exoplayer2.util.MimeTypes;
@ -323,7 +323,7 @@ public final class PlayerHelper {
return 60000;
}
public static ExoTrackSelection.Factory getQualitySelector() {
public static TrackSelection.Factory getQualitySelector() {
return new AdaptiveTrackSelection.Factory(
1000,
AdaptiveTrackSelection.DEFAULT_MAX_DURATION_FOR_QUALITY_DECREASE_MS,

View File

@ -13,7 +13,7 @@ import com.google.android.exoplayer2.RendererCapabilities.Capabilities;
import com.google.android.exoplayer2.source.TrackGroup;
import com.google.android.exoplayer2.source.TrackGroupArray;
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
import com.google.android.exoplayer2.trackselection.ExoTrackSelection;
import com.google.android.exoplayer2.trackselection.TrackSelection;
import com.google.android.exoplayer2.util.Assertions;
/**
@ -28,7 +28,7 @@ public class CustomTrackSelector extends DefaultTrackSelector {
private String preferredTextLanguage;
public CustomTrackSelector(final Context context,
final ExoTrackSelection.Factory adaptiveTrackSelectionFactory) {
final TrackSelection.Factory adaptiveTrackSelectionFactory) {
super(context, adaptiveTrackSelectionFactory);
}
@ -50,7 +50,7 @@ public class CustomTrackSelector extends DefaultTrackSelector {
@Override
@Nullable
protected Pair<ExoTrackSelection.Definition, TextTrackScore> selectTextTrack(
protected Pair<TrackSelection.Definition, TextTrackScore> selectTextTrack(
final TrackGroupArray groups,
@NonNull final int[][] formatSupport,
@NonNull final Parameters params,
@ -86,7 +86,7 @@ public class CustomTrackSelector extends DefaultTrackSelector {
}
}
return selectedGroup == null ? null
: Pair.create(new ExoTrackSelection.Definition(selectedGroup, selectedTrackIndex),
: Pair.create(new TrackSelection.Definition(selectedGroup, selectedTrackIndex),
Assertions.checkNotNull(selectedTrackScore));
}
}