From af8b8125e523a6d3803eb2c272ec9cfa6ead634d Mon Sep 17 00:00:00 2001 From: ibaker Date: Mon, 24 Feb 2020 11:31:00 +0000 Subject: [PATCH] Remove BaseRenderer#getUpdatedSourceDrmSession This seems to be no longer used PiperOrigin-RevId: 296856117 --- .../android/exoplayer2/BaseRenderer.java | 34 ------------------- 1 file changed, 34 deletions(-) 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. */