Commit 7a10f2bf by aquilescanta Committed by Oliver Woodman

Remove pre-renderer-migration workarounds in SampleQueue

They are no longer necessary.

PiperOrigin-RevId: 296193350
parent 47133f46
...@@ -775,13 +775,6 @@ public class SampleQueue implements TrackOutput { ...@@ -775,13 +775,6 @@ public class SampleQueue implements TrackOutput {
boolean isFirstFormat = downstreamFormat == null; boolean isFirstFormat = downstreamFormat == null;
@Nullable DrmInitData oldDrmInitData = isFirstFormat ? null : downstreamFormat.drmInitData; @Nullable DrmInitData oldDrmInitData = isFirstFormat ? null : downstreamFormat.drmInitData;
downstreamFormat = newFormat; downstreamFormat = newFormat;
if (drmSessionManager == DrmSessionManager.DUMMY) {
// Avoid attempting to acquire a session using the dummy DRM session manager. It's likely that
// the media source creation has not yet been migrated and the renderer can acquire the
// session for the read DRM init data.
// TODO: Remove once renderers are migrated [Internal ref: b/122519809].
return;
}
@Nullable DrmInitData newDrmInitData = newFormat.drmInitData; @Nullable DrmInitData newDrmInitData = newFormat.drmInitData;
outputFormatHolder.drmSession = currentDrmSession; outputFormatHolder.drmSession = currentDrmSession;
if (!isFirstFormat && Util.areEqual(oldDrmInitData, newDrmInitData)) { if (!isFirstFormat && Util.areEqual(oldDrmInitData, newDrmInitData)) {
...@@ -811,12 +804,6 @@ public class SampleQueue implements TrackOutput { ...@@ -811,12 +804,6 @@ public class SampleQueue implements TrackOutput {
* @return Whether it's possible to read the next sample. * @return Whether it's possible to read the next sample.
*/ */
private boolean mayReadSample(int relativeReadIndex) { private boolean mayReadSample(int relativeReadIndex) {
if (drmSessionManager == DrmSessionManager.DUMMY) {
// TODO: Remove once renderers are migrated [Internal ref: b/122519809].
// For protected content it's likely that the DrmSessionManager is still being injected into
// the renderers. We assume that the renderers will be able to acquire a DrmSession if needed.
return true;
}
return currentDrmSession == null return currentDrmSession == null
|| currentDrmSession.getState() == DrmSession.STATE_OPENED_WITH_KEYS || currentDrmSession.getState() == DrmSession.STATE_OPENED_WITH_KEYS
|| ((flags[relativeReadIndex] & C.BUFFER_FLAG_ENCRYPTED) == 0 || ((flags[relativeReadIndex] & C.BUFFER_FLAG_ENCRYPTED) == 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment