diff --git a/library/core/src/main/java/com/google/android/exoplayer2/BaseRenderer.java b/library/core/src/main/java/com/google/android/exoplayer2/BaseRenderer.java index 0d0a7a23d7..2ede176d76 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/BaseRenderer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/BaseRenderer.java @@ -15,16 +15,11 @@ */ package com.google.android.exoplayer2; -import android.os.Looper; import androidx.annotation.Nullable; import com.google.android.exoplayer2.decoder.DecoderInputBuffer; -import com.google.android.exoplayer2.drm.DrmSession; -import com.google.android.exoplayer2.drm.DrmSessionManager; -import com.google.android.exoplayer2.drm.ExoMediaCrypto; import com.google.android.exoplayer2.source.SampleStream; import com.google.android.exoplayer2.util.Assertions; import com.google.android.exoplayer2.util.MediaClock; -import com.google.android.exoplayer2.util.Util; import java.io.IOException; /** @@ -307,35 +302,6 @@ public abstract class BaseRenderer implements Renderer, RendererCapabilities { return configuration; } - /** Returns a {@link DrmSession} ready for assignment, handling resource management. */ - @Nullable - protected final DrmSession getUpdatedSourceDrmSession( - @Nullable Format oldFormat, - Format newFormat, - @Nullable DrmSessionManager drmSessionManager, - @Nullable DrmSession existingSourceSession) - throws ExoPlaybackException { - boolean drmInitDataChanged = - !Util.areEqual(newFormat.drmInitData, oldFormat == null ? null : oldFormat.drmInitData); - if (!drmInitDataChanged) { - return existingSourceSession; - } - @Nullable DrmSession newSourceDrmSession = null; - if (newFormat.drmInitData != null) { - if (drmSessionManager == null) { - throw createRendererException( - new IllegalStateException("Media requires a DrmSessionManager"), newFormat); - } - newSourceDrmSession = - drmSessionManager.acquireSession( - Assertions.checkNotNull(Looper.myLooper()), newFormat.drmInitData); - } - if (existingSourceSession != null) { - existingSourceSession.release(); - } - return newSourceDrmSession; - } - /** * Returns the index of the renderer within the player. */