Rename FormatHolder.decryptionResourceIsProvided to FormatHolder.includesDrmSession
PiperOrigin-RevId: 254187403
This commit is contained in:
parent
ae969397bb
commit
acad64cae8
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user