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