Commit 0ce2632a by olly Committed by Oliver Woodman

Clean up some Format documentation

- Fix spurious line break
- Try and cut down on references to other components

PiperOrigin-RevId: 322971988
parent f24ba73b
...@@ -165,7 +165,7 @@ public final class Format implements Parcelable { ...@@ -165,7 +165,7 @@ public final class Format implements Parcelable {
private int accessibilityChannel; private int accessibilityChannel;
// Provided by source. // Provided by the source.
@Nullable private Class<? extends ExoMediaCrypto> exoMediaCryptoType; @Nullable private Class<? extends ExoMediaCrypto> exoMediaCryptoType;
...@@ -230,7 +230,7 @@ public final class Format implements Parcelable { ...@@ -230,7 +230,7 @@ public final class Format implements Parcelable {
this.encoderPadding = format.encoderPadding; this.encoderPadding = format.encoderPadding;
// Text specific. // Text specific.
this.accessibilityChannel = format.accessibilityChannel; this.accessibilityChannel = format.accessibilityChannel;
// Provided by source. // Provided by the source.
this.exoMediaCryptoType = format.exoMediaCryptoType; this.exoMediaCryptoType = format.exoMediaCryptoType;
} }
...@@ -787,9 +787,9 @@ public final class Format implements Parcelable { ...@@ -787,9 +787,9 @@ public final class Format implements Parcelable {
// Provided by source. // Provided by source.
/** /**
* The type of the {@link ExoMediaCrypto} that the source will associate to the content that this * The type of {@link ExoMediaCrypto} that will be associated with the content this format
* format describes, or null if the source will not associate an {@link ExoMediaCrypto}. Cannot be * describes, or {@code null} if the content is not encrypted. Cannot be null if {@link
* null if {@link #drmInitData} is not null. * #drmInitData} is non-null.
*/ */
@Nullable public final Class<? extends ExoMediaCrypto> exoMediaCryptoType; @Nullable public final Class<? extends ExoMediaCrypto> exoMediaCryptoType;
...@@ -1287,10 +1287,7 @@ public final class Format implements Parcelable { ...@@ -1287,10 +1287,7 @@ public final class Format implements Parcelable {
this.accessibilityChannel = accessibilityChannel; this.accessibilityChannel = accessibilityChannel;
// Provided by source. // Provided by source.
if (exoMediaCryptoType == null && drmInitData != null) { if (exoMediaCryptoType == null && drmInitData != null) {
// Described content is encrypted but no exoMediaCryptoType has been assigned. Use // Encrypted content must always have a non-null exoMediaCryptoType.
// UnsupportedMediaCrypto (not supported by any Renderers), so MediaSources are forced to
// replace
// this value in order to have Renderers flag this Format as supported.
exoMediaCryptoType = UnsupportedMediaCrypto.class; exoMediaCryptoType = UnsupportedMediaCrypto.class;
} }
this.exoMediaCryptoType = exoMediaCryptoType; this.exoMediaCryptoType = exoMediaCryptoType;
...@@ -1340,9 +1337,7 @@ public final class Format implements Parcelable { ...@@ -1340,9 +1337,7 @@ public final class Format implements Parcelable {
// Text specific. // Text specific.
accessibilityChannel = in.readInt(); accessibilityChannel = in.readInt();
// Provided by source. // Provided by source.
// If the described content is encrypted. Use UnsupportedMediaCrypto (not supported by any // Encrypted content must always have a non-null exoMediaCryptoType.
// Renderers), so MediaSources are forced to replace this value in order to have Renderers flag
// this Format as supported.
exoMediaCryptoType = drmInitData != null ? UnsupportedMediaCrypto.class : null; exoMediaCryptoType = drmInitData != null ? UnsupportedMediaCrypto.class : null;
} }
...@@ -1570,7 +1565,7 @@ public final class Format implements Parcelable { ...@@ -1570,7 +1565,7 @@ public final class Format implements Parcelable {
result = 31 * result + encoderPadding; result = 31 * result + encoderPadding;
// Text specific. // Text specific.
result = 31 * result + accessibilityChannel; result = 31 * result + accessibilityChannel;
// Provided by source. // Provided by the source.
result = 31 * result + (exoMediaCryptoType == null ? 0 : exoMediaCryptoType.hashCode()); result = 31 * result + (exoMediaCryptoType == null ? 0 : exoMediaCryptoType.hashCode());
hashCode = result; hashCode = result;
} }
......
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