Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/schabi/newpipe/player/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ private void initPlayer(final boolean playOnReady) {
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");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void onAnimationEnd(final Animator animation) {
//////////////////////////////////////////////////////////////////////////*/

@Override
public void onAudioSessionIdChanged(final EventTime eventTime, final int audioSessionId) {
public void onAudioSessionId(final EventTime eventTime, final int audioSessionId) {
if (!PlayerHelper.isUsingDSP()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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 {
Expand Down Expand Up @@ -48,7 +48,7 @@ public void onPrepared() {

@Override
public void onTracksSelected(final Renderer[] renderers, final TrackGroupArray trackGroups,
final ExoTrackSelection[] trackSelections) {
final TrackSelectionArray trackSelections) {
internalLoadControl.onTracksSelected(renderers, trackGroups, trackSelections);
}

Expand Down Expand Up @@ -92,12 +92,11 @@ public boolean shouldContinueLoading(final long playbackPositionUs,

@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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
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;
Expand Down Expand Up @@ -323,7 +323,7 @@ public static int getPlaybackOptimalBufferMs() {
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
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;

/**
Expand All @@ -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);
}

Expand All @@ -50,7 +50,7 @@ public void setPreferredTextLanguage(@NonNull final String label) {

@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,
Expand Down Expand Up @@ -86,7 +86,7 @@ protected Pair<ExoTrackSelection.Definition, TextTrackScore> selectTextTrack(
}
}
return selectedGroup == null ? null
: Pair.create(new ExoTrackSelection.Definition(selectedGroup, selectedTrackIndex),
: Pair.create(new TrackSelection.Definition(selectedGroup, selectedTrackIndex),
Assertions.checkNotNull(selectedTrackScore));
}
}