Commit acad64ca by aquilescanta Committed by Oliver Woodman

Rename FormatHolder.decryptionResourceIsProvided to FormatHolder.includesDrmSession

PiperOrigin-RevId: 254187403
parent ae969397
......@@ -499,7 +499,7 @@ public class LibvpxVideoRenderer extends BaseRenderer {
: oldFormat.drmInitData);
if (drmInitDataChanged) {
if (format.drmInitData != null) {
if (formatHolder.decryptionResourceIsProvided) {
if (formatHolder.includesDrmSession) {
setSourceDrmSession((DrmSession<ExoMediaCrypto>) formatHolder.drmSession);
} else {
if (drmSessionManager == null) {
......
......@@ -23,13 +23,10 @@ import com.google.android.exoplayer2.drm.DrmSession;
*/
public final class FormatHolder {
/**
* Whether the object expected to populate {@link #format} is also expected to populate {@link
* #drmSession}.
*/
/** Whether the {@link #format} setter also sets the {@link #drmSession} field. */
// TODO: Remove once all Renderers and MediaSources have migrated to the new DRM model [Internal
// ref: b/129764794].
public boolean decryptionResourceIsProvided;
public boolean includesDrmSession;
/** An accompanying context for decrypting samples in the format. */
@Nullable public DrmSession<?> drmSession;
......
......@@ -665,7 +665,7 @@ public abstract class SimpleDecoderAudioRenderer extends BaseRenderer implements
if (drmInitDataChanged) {
if (inputFormat.drmInitData != null) {
if (formatHolder.decryptionResourceIsProvided) {
if (formatHolder.includesDrmSession) {
setSourceDrmSession((DrmSession<ExoMediaCrypto>) formatHolder.drmSession);
} else {
if (drmSessionManager == null) {
......
......@@ -1200,7 +1200,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
!Util.areEqual(newFormat.drmInitData, oldFormat == null ? null : oldFormat.drmInitData);
if (drmInitDataChanged) {
if (newFormat.drmInitData != null) {
if (formatHolder.decryptionResourceIsProvided) {
if (formatHolder.includesDrmSession) {
setSourceDrmSession((DrmSession<FrameworkMediaCrypto>) formatHolder.drmSession);
} else {
if (drmSessionManager == null) {
......
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