mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Remove BaseRenderer#getUpdatedSourceDrmSession
This seems to be no longer used PiperOrigin-RevId: 296856117
This commit is contained in:
parent
6fc5e6b905
commit
af8b8125e5
1 changed files with 0 additions and 34 deletions
|
|
@ -15,16 +15,11 @@
|
||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2;
|
package com.google.android.exoplayer2;
|
||||||
|
|
||||||
import android.os.Looper;
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import com.google.android.exoplayer2.decoder.DecoderInputBuffer;
|
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.source.SampleStream;
|
||||||
import com.google.android.exoplayer2.util.Assertions;
|
import com.google.android.exoplayer2.util.Assertions;
|
||||||
import com.google.android.exoplayer2.util.MediaClock;
|
import com.google.android.exoplayer2.util.MediaClock;
|
||||||
import com.google.android.exoplayer2.util.Util;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -307,35 +302,6 @@ public abstract class BaseRenderer implements Renderer, RendererCapabilities {
|
||||||
return configuration;
|
return configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns a {@link DrmSession} ready for assignment, handling resource management. */
|
|
||||||
@Nullable
|
|
||||||
protected final <T extends ExoMediaCrypto> DrmSession<T> getUpdatedSourceDrmSession(
|
|
||||||
@Nullable Format oldFormat,
|
|
||||||
Format newFormat,
|
|
||||||
@Nullable DrmSessionManager<T> drmSessionManager,
|
|
||||||
@Nullable DrmSession<T> existingSourceSession)
|
|
||||||
throws ExoPlaybackException {
|
|
||||||
boolean drmInitDataChanged =
|
|
||||||
!Util.areEqual(newFormat.drmInitData, oldFormat == null ? null : oldFormat.drmInitData);
|
|
||||||
if (!drmInitDataChanged) {
|
|
||||||
return existingSourceSession;
|
|
||||||
}
|
|
||||||
@Nullable DrmSession<T> 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.
|
* Returns the index of the renderer within the player.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue