mirror of
https://github.com/androidx/media.git
synced 2025-05-07 23:50:44 +08:00
Rollback of 5d9c2d7b6a
*** Original commit *** Suppress warnings in preparation for Checker Framework 3.7.1 upgrade. *** PiperOrigin-RevId: 343086403
This commit is contained in:
parent
44009ea686
commit
f13ffb4390
@ -42,11 +42,7 @@ import java.util.List;
|
|||||||
// LINT.ThenChange(../../../../../../../jni/ffmpeg_jni.cc)
|
// LINT.ThenChange(../../../../../../../jni/ffmpeg_jni.cc)
|
||||||
|
|
||||||
private final String codecName;
|
private final String codecName;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable private final byte[] extraData;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
private final byte[] extraData;
|
|
||||||
|
|
||||||
private final @C.Encoding int encoding;
|
private final @C.Encoding int encoding;
|
||||||
private final int outputBufferSize;
|
private final int outputBufferSize;
|
||||||
|
|
||||||
@ -167,8 +163,6 @@ import java.util.List;
|
|||||||
* Returns FFmpeg-compatible codec-specific initialization data ("extra data"), or {@code null} if
|
* Returns FFmpeg-compatible codec-specific initialization data ("extra data"), or {@code null} if
|
||||||
* not required.
|
* not required.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private static @Nullable byte[] getExtraData(String mimeType, List<byte[]> initializationData) {
|
private static @Nullable byte[] getExtraData(String mimeType, List<byte[]> initializationData) {
|
||||||
switch (mimeType) {
|
switch (mimeType) {
|
||||||
case MimeTypes.AUDIO_AAC:
|
case MimeTypes.AUDIO_AAC:
|
||||||
@ -215,8 +209,6 @@ import java.util.List;
|
|||||||
return extraData;
|
return extraData;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private native long ffmpegInitialize(
|
private native long ffmpegInitialize(
|
||||||
String codecName,
|
String codecName,
|
||||||
@Nullable byte[] extraData,
|
@Nullable byte[] extraData,
|
||||||
@ -231,8 +223,6 @@ import java.util.List;
|
|||||||
|
|
||||||
private native int ffmpegGetSampleRate(long context);
|
private native int ffmpegGetSampleRate(long context);
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private native long ffmpegReset(long context, @Nullable byte[] extraData);
|
private native long ffmpegReset(long context, @Nullable byte[] extraData);
|
||||||
|
|
||||||
private native void ffmpegRelease(long context);
|
private native void ffmpegRelease(long context);
|
||||||
|
@ -50,11 +50,7 @@ import java.nio.ByteBuffer;
|
|||||||
|
|
||||||
@Nullable private ByteBuffer byteBufferData;
|
@Nullable private ByteBuffer byteBufferData;
|
||||||
@Nullable private ExtractorInput extractorInput;
|
@Nullable private ExtractorInput extractorInput;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable private byte[] tempBuffer;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
private byte[] tempBuffer;
|
|
||||||
|
|
||||||
private boolean endOfExtractorInput;
|
private boolean endOfExtractorInput;
|
||||||
|
|
||||||
public FlacDecoderJni() throws FlacDecoderException {
|
public FlacDecoderJni() throws FlacDecoderException {
|
||||||
@ -230,8 +226,6 @@ import java.nio.ByteBuffer;
|
|||||||
* @return The corresponding {@link SeekMap.SeekPoints} obtained from the seek table, or {@code
|
* @return The corresponding {@link SeekMap.SeekPoints} obtained from the seek table, or {@code
|
||||||
* null} if the stream doesn't have a seek table.
|
* null} if the stream doesn't have a seek table.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public SeekMap.SeekPoints getSeekPoints(long timeUs) {
|
public SeekMap.SeekPoints getSeekPoints(long timeUs) {
|
||||||
long[] seekPoints = new long[4];
|
long[] seekPoints = new long[4];
|
||||||
|
@ -384,8 +384,6 @@ public final class MediaSessionConnector {
|
|||||||
* @param player The player connected to the media session.
|
* @param player The player connected to the media session.
|
||||||
* @return The custom action to be included in the session playback state or {@code null}.
|
* @return The custom action to be included in the session playback state or {@code null}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
PlaybackStateCompat.CustomAction getCustomAction(Player player);
|
PlaybackStateCompat.CustomAction getCustomAction(Player player);
|
||||||
}
|
}
|
||||||
@ -739,8 +737,6 @@ public final class MediaSessionConnector {
|
|||||||
|
|
||||||
Map<String, CustomActionProvider> currentActions = new HashMap<>();
|
Map<String, CustomActionProvider> currentActions = new HashMap<>();
|
||||||
for (CustomActionProvider customActionProvider : customActionProviders) {
|
for (CustomActionProvider customActionProvider : customActionProviders) {
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
PlaybackStateCompat.CustomAction customAction = customActionProvider.getCustomAction(player);
|
PlaybackStateCompat.CustomAction customAction = customActionProvider.getCustomAction(player);
|
||||||
if (customAction != null) {
|
if (customAction != null) {
|
||||||
|
@ -237,8 +237,6 @@ import java.util.List;
|
|||||||
int inputSize,
|
int inputSize,
|
||||||
SimpleOutputBuffer outputBuffer);
|
SimpleOutputBuffer outputBuffer);
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private native int opusSecureDecode(
|
private native int opusSecureDecode(
|
||||||
long decoder,
|
long decoder,
|
||||||
long timeUs,
|
long timeUs,
|
||||||
|
@ -207,8 +207,6 @@ import java.nio.ByteBuffer;
|
|||||||
private native long vpxClose(long context);
|
private native long vpxClose(long context);
|
||||||
private native long vpxDecode(long context, ByteBuffer encoded, int length);
|
private native long vpxDecode(long context, ByteBuffer encoded, int length);
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private native long vpxSecureDecode(
|
private native long vpxSecureDecode(
|
||||||
long context,
|
long context,
|
||||||
ByteBuffer encoded,
|
ByteBuffer encoded,
|
||||||
|
@ -100,10 +100,7 @@ public final class AudioAttributes {
|
|||||||
public final @C.AudioUsage int usage;
|
public final @C.AudioUsage int usage;
|
||||||
public final @C.AudioAllowedCapturePolicy int allowedCapturePolicy;
|
public final @C.AudioAllowedCapturePolicy int allowedCapturePolicy;
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private android.media.AudioAttributes audioAttributesV21;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private android.media.AudioAttributes audioAttributesV21;
|
|
||||||
|
|
||||||
private AudioAttributes(
|
private AudioAttributes(
|
||||||
@C.AudioContentType int contentType,
|
@C.AudioContentType int contentType,
|
||||||
|
@ -32,19 +32,13 @@ public final class CryptoInfo {
|
|||||||
*
|
*
|
||||||
* @see android.media.MediaCodec.CryptoInfo#iv
|
* @see android.media.MediaCodec.CryptoInfo#iv
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable public byte[] iv;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
public byte[] iv;
|
|
||||||
/**
|
/**
|
||||||
* The 16 byte key id.
|
* The 16 byte key id.
|
||||||
*
|
*
|
||||||
* @see android.media.MediaCodec.CryptoInfo#key
|
* @see android.media.MediaCodec.CryptoInfo#key
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable public byte[] key;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
public byte[] key;
|
|
||||||
/**
|
/**
|
||||||
* The type of encryption that has been applied. Must be one of the {@link C.CryptoMode} values.
|
* The type of encryption that has been applied. Must be one of the {@link C.CryptoMode} values.
|
||||||
*
|
*
|
||||||
@ -57,20 +51,14 @@ public final class CryptoInfo {
|
|||||||
*
|
*
|
||||||
* @see android.media.MediaCodec.CryptoInfo#numBytesOfClearData
|
* @see android.media.MediaCodec.CryptoInfo#numBytesOfClearData
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable public int[] numBytesOfClearData;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
public int[] numBytesOfClearData;
|
|
||||||
/**
|
/**
|
||||||
* The number of trailing encrypted bytes in each sub-sample. If null, all bytes are treated as
|
* The number of trailing encrypted bytes in each sub-sample. If null, all bytes are treated as
|
||||||
* clear and {@link #numBytesOfClearData} must be specified.
|
* clear and {@link #numBytesOfClearData} must be specified.
|
||||||
*
|
*
|
||||||
* @see android.media.MediaCodec.CryptoInfo#numBytesOfEncryptedData
|
* @see android.media.MediaCodec.CryptoInfo#numBytesOfEncryptedData
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable public int[] numBytesOfEncryptedData;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
public int[] numBytesOfEncryptedData;
|
|
||||||
/**
|
/**
|
||||||
* The number of subSamples that make up the buffer's contents.
|
* The number of subSamples that make up the buffer's contents.
|
||||||
*
|
*
|
||||||
|
@ -291,10 +291,7 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
|
|||||||
/** The mimeType of {@link #data}. */
|
/** The mimeType of {@link #data}. */
|
||||||
public final String mimeType;
|
public final String mimeType;
|
||||||
/** The initialization data. May be null for scheme support checks only. */
|
/** The initialization data. May be null for scheme support checks only. */
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable public final byte[] data;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
public final byte[] data;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param uuid The {@link UUID} of the DRM scheme, or {@link C#UUID_NIL} if the data is
|
* @param uuid The {@link UUID} of the DRM scheme, or {@link C#UUID_NIL} if the data is
|
||||||
@ -302,8 +299,6 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
|
|||||||
* @param mimeType See {@link #mimeType}.
|
* @param mimeType See {@link #mimeType}.
|
||||||
* @param data See {@link #data}.
|
* @param data See {@link #data}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public SchemeData(UUID uuid, String mimeType, @Nullable byte[] data) {
|
public SchemeData(UUID uuid, String mimeType, @Nullable byte[] data) {
|
||||||
this(uuid, /* licenseServerUrl= */ null, mimeType, data);
|
this(uuid, /* licenseServerUrl= */ null, mimeType, data);
|
||||||
}
|
}
|
||||||
@ -315,8 +310,6 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
|
|||||||
* @param mimeType See {@link #mimeType}.
|
* @param mimeType See {@link #mimeType}.
|
||||||
* @param data See {@link #data}.
|
* @param data See {@link #data}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public SchemeData(
|
public SchemeData(
|
||||||
UUID uuid, @Nullable String licenseServerUrl, String mimeType, @Nullable byte[] data) {
|
UUID uuid, @Nullable String licenseServerUrl, String mimeType, @Nullable byte[] data) {
|
||||||
this.uuid = Assertions.checkNotNull(uuid);
|
this.uuid = Assertions.checkNotNull(uuid);
|
||||||
@ -365,8 +358,6 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
|
|||||||
* @param data The data to include in the copy.
|
* @param data The data to include in the copy.
|
||||||
* @return The new instance.
|
* @return The new instance.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public SchemeData copyWithData(@Nullable byte[] data) {
|
public SchemeData copyWithData(@Nullable byte[] data) {
|
||||||
return new SchemeData(uuid, licenseServerUrl, mimeType, data);
|
return new SchemeData(uuid, licenseServerUrl, mimeType, data);
|
||||||
}
|
}
|
||||||
|
@ -44,8 +44,6 @@ public final class Metadata implements Parcelable {
|
|||||||
* Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain
|
* Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain
|
||||||
* wrapped metadata.
|
* wrapped metadata.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
default byte[] getWrappedMetadataBytes() {
|
default byte[] getWrappedMetadataBytes() {
|
||||||
return null;
|
return null;
|
||||||
|
@ -118,8 +118,6 @@ public final class EventMessage implements Metadata.Entry {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public byte[] getWrappedMetadataBytes() {
|
public byte[] getWrappedMetadataBytes() {
|
||||||
|
@ -40,11 +40,7 @@ public final class DataSpec {
|
|||||||
@Nullable private Uri uri;
|
@Nullable private Uri uri;
|
||||||
private long uriPositionOffset;
|
private long uriPositionOffset;
|
||||||
@HttpMethod private int httpMethod;
|
@HttpMethod private int httpMethod;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable private byte[] httpBody;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
private byte[] httpBody;
|
|
||||||
|
|
||||||
private Map<String, String> httpRequestHeaders;
|
private Map<String, String> httpRequestHeaders;
|
||||||
private long position;
|
private long position;
|
||||||
private long length;
|
private long length;
|
||||||
@ -127,8 +123,6 @@ public final class DataSpec {
|
|||||||
* @param httpBody The {@link DataSpec#httpBody}.
|
* @param httpBody The {@link DataSpec#httpBody}.
|
||||||
* @return The builder.
|
* @return The builder.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public Builder setHttpBody(@Nullable byte[] httpBody) {
|
public Builder setHttpBody(@Nullable byte[] httpBody) {
|
||||||
this.httpBody = httpBody;
|
this.httpBody = httpBody;
|
||||||
return this;
|
return this;
|
||||||
@ -330,10 +324,7 @@ public final class DataSpec {
|
|||||||
* The HTTP request body, null otherwise. If the body is non-null, then {@code httpBody.length}
|
* The HTTP request body, null otherwise. If the body is non-null, then {@code httpBody.length}
|
||||||
* will be non-zero.
|
* will be non-zero.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable public final byte[] httpBody;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
public final byte[] httpBody;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additional HTTP headers to use when requesting the data.
|
* Additional HTTP headers to use when requesting the data.
|
||||||
@ -538,8 +529,7 @@ public final class DataSpec {
|
|||||||
* @param key {@link #key}.
|
* @param key {@link #key}.
|
||||||
* @param flags {@link #flags}.
|
* @param flags {@link #flags}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
@SuppressWarnings("deprecation")
|
||||||
@SuppressWarnings({"deprecation", "nullness:nullness.on.primitive"})
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public DataSpec(
|
public DataSpec(
|
||||||
Uri uri,
|
Uri uri,
|
||||||
@ -573,8 +563,7 @@ public final class DataSpec {
|
|||||||
* @param key {@link #key}.
|
* @param key {@link #key}.
|
||||||
* @param flags {@link #flags}.
|
* @param flags {@link #flags}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
@SuppressWarnings("deprecation")
|
||||||
@SuppressWarnings({"deprecation", "nullness:nullness.on.primitive"})
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public DataSpec(
|
public DataSpec(
|
||||||
Uri uri,
|
Uri uri,
|
||||||
@ -611,8 +600,6 @@ public final class DataSpec {
|
|||||||
* @param flags {@link #flags}.
|
* @param flags {@link #flags}.
|
||||||
* @param httpRequestHeaders {@link #httpRequestHeaders}.
|
* @param httpRequestHeaders {@link #httpRequestHeaders}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public DataSpec(
|
public DataSpec(
|
||||||
Uri uri,
|
Uri uri,
|
||||||
@ -637,8 +624,7 @@ public final class DataSpec {
|
|||||||
/* customData= */ null);
|
/* customData= */ null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
@SuppressWarnings("deprecation")
|
||||||
@SuppressWarnings({"deprecation", "nullness:nullness.on.primitive"})
|
|
||||||
private DataSpec(
|
private DataSpec(
|
||||||
Uri uri,
|
Uri uri,
|
||||||
long uriPositionOffset,
|
long uriPositionOffset,
|
||||||
|
@ -50,10 +50,7 @@ public final class ColorInfo implements Parcelable {
|
|||||||
@C.ColorTransfer public final int colorTransfer;
|
@C.ColorTransfer public final int colorTransfer;
|
||||||
|
|
||||||
/** HdrStaticInfo as defined in CTA-861.3, or null if none specified. */
|
/** HdrStaticInfo as defined in CTA-861.3, or null if none specified. */
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable public final byte[] hdrStaticInfo;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
public final byte[] hdrStaticInfo;
|
|
||||||
|
|
||||||
// Lazily initialized hashcode.
|
// Lazily initialized hashcode.
|
||||||
private int hashCode;
|
private int hashCode;
|
||||||
@ -66,8 +63,6 @@ public final class ColorInfo implements Parcelable {
|
|||||||
* @param colorTransfer The color transfer characteristics of the video.
|
* @param colorTransfer The color transfer characteristics of the video.
|
||||||
* @param hdrStaticInfo HdrStaticInfo as defined in CTA-861.3, or null if none specified.
|
* @param hdrStaticInfo HdrStaticInfo as defined in CTA-861.3, or null if none specified.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public ColorInfo(
|
public ColorInfo(
|
||||||
@C.ColorSpace int colorSpace,
|
@C.ColorSpace int colorSpace,
|
||||||
@C.ColorRange int colorRange,
|
@C.ColorRange int colorRange,
|
||||||
|
@ -101,15 +101,8 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
|
|||||||
@Nullable private final Format primaryTrackManifestFormat;
|
@Nullable private final Format primaryTrackManifestFormat;
|
||||||
|
|
||||||
private ExtractorOutput extractorOutput;
|
private ExtractorOutput extractorOutput;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private MediaParser.SeekMap dummySeekMap;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
@Nullable private MediaParser.SeekMap lastSeekMap;
|
||||||
@Nullable
|
|
||||||
private MediaParser.SeekMap dummySeekMap;
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private MediaParser.SeekMap lastSeekMap;
|
|
||||||
|
|
||||||
@Nullable private String containerMimeType;
|
@Nullable private String containerMimeType;
|
||||||
@Nullable private ChunkIndex lastChunkIndex;
|
@Nullable private ChunkIndex lastChunkIndex;
|
||||||
@Nullable private TimestampAdjuster timestampAdjuster;
|
@Nullable private TimestampAdjuster timestampAdjuster;
|
||||||
@ -201,8 +194,6 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
|
|||||||
* {@link MediaParser.SeekPoint#timeMicros} matches the requested timestamp, and {@link
|
* {@link MediaParser.SeekPoint#timeMicros} matches the requested timestamp, and {@link
|
||||||
* MediaParser.SeekPoint#position} is 0.
|
* MediaParser.SeekPoint#position} is 0.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public MediaParser.SeekMap getDummySeekMap() {
|
public MediaParser.SeekMap getDummySeekMap() {
|
||||||
return dummySeekMap;
|
return dummySeekMap;
|
||||||
@ -325,8 +316,6 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
|
|||||||
scratchDataReaderAdapter, (int) sampleData.getLength(), /* allowEndOfInput= */ true);
|
scratchDataReaderAdapter, (int) sampleData.getLength(), /* allowEndOfInput= */ true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Override
|
@Override
|
||||||
public void onSampleCompleted(
|
public void onSampleCompleted(
|
||||||
int trackIndex,
|
int trackIndex,
|
||||||
@ -534,8 +523,6 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
|
|||||||
return formatBuilder.build();
|
return formatBuilder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private static DrmInitData toExoPlayerDrmInitData(
|
private static DrmInitData toExoPlayerDrmInitData(
|
||||||
@Nullable String schemeType, @Nullable android.media.DrmInitData drmInitData) {
|
@Nullable String schemeType, @Nullable android.media.DrmInitData drmInitData) {
|
||||||
@ -593,8 +580,6 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
|
|||||||
private static ColorInfo getColorInfo(MediaFormat mediaFormat) {
|
private static ColorInfo getColorInfo(MediaFormat mediaFormat) {
|
||||||
@Nullable
|
@Nullable
|
||||||
ByteBuffer hdrStaticInfoByteBuffer = mediaFormat.getByteBuffer(MediaFormat.KEY_HDR_STATIC_INFO);
|
ByteBuffer hdrStaticInfoByteBuffer = mediaFormat.getByteBuffer(MediaFormat.KEY_HDR_STATIC_INFO);
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
byte[] hdrStaticInfo =
|
byte[] hdrStaticInfo =
|
||||||
hdrStaticInfoByteBuffer != null ? getArray(hdrStaticInfoByteBuffer) : null;
|
hdrStaticInfoByteBuffer != null ? getArray(hdrStaticInfoByteBuffer) : null;
|
||||||
@ -696,10 +681,7 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
|
|||||||
|
|
||||||
private static final class DataReaderAdapter implements DataReader {
|
private static final class DataReaderAdapter implements DataReader {
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable public MediaParser.InputReader input;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
public MediaParser.InputReader input;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(byte[] target, int offset, int length) throws IOException {
|
public int read(byte[] target, int offset, int length) throws IOException {
|
||||||
|
@ -565,8 +565,6 @@ public final class Cue {
|
|||||||
*
|
*
|
||||||
* @see Cue#textAlignment
|
* @see Cue#textAlignment
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
public Builder setTextAlignment(@Nullable Layout.Alignment textAlignment) {
|
public Builder setTextAlignment(@Nullable Layout.Alignment textAlignment) {
|
||||||
this.textAlignment = textAlignment;
|
this.textAlignment = textAlignment;
|
||||||
return this;
|
return this;
|
||||||
|
@ -625,8 +625,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Draws a pixel data sub-block, as defined by ETSI EN 300 743 7.2.5.1, into a canvas. */
|
/** Draws a pixel data sub-block, as defined by ETSI EN 300 743 7.2.5.1, into a canvas. */
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private static void paintPixelDataSubBlock(
|
private static void paintPixelDataSubBlock(
|
||||||
byte[] pixelData,
|
byte[] pixelData,
|
||||||
int[] clutEntries,
|
int[] clutEntries,
|
||||||
@ -638,18 +636,9 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
ParsableBitArray data = new ParsableBitArray(pixelData);
|
ParsableBitArray data = new ParsableBitArray(pixelData);
|
||||||
int column = horizontalAddress;
|
int column = horizontalAddress;
|
||||||
int line = verticalAddress;
|
int line = verticalAddress;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable byte[] clutMapTable2To4 = null;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
@Nullable byte[] clutMapTable2To8 = null;
|
||||||
@Nullable
|
@Nullable byte[] clutMapTable4To8 = null;
|
||||||
byte[] clutMapTable2To4 = null;
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
byte[] clutMapTable2To8 = null;
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
byte[] clutMapTable4To8 = null;
|
|
||||||
|
|
||||||
while (data.bitsLeft() != 0) {
|
while (data.bitsLeft() != 0) {
|
||||||
int dataType = data.readBits(8);
|
int dataType = data.readBits(8);
|
||||||
@ -704,8 +693,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Paint a 2-bit/pixel code string, as defined by ETSI EN 300 743 7.2.5.2, to a canvas. */
|
/** Paint a 2-bit/pixel code string, as defined by ETSI EN 300 743 7.2.5.2, to a canvas. */
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private static int paint2BitPixelCodeString(
|
private static int paint2BitPixelCodeString(
|
||||||
ParsableBitArray data,
|
ParsableBitArray data,
|
||||||
int[] clutEntries,
|
int[] clutEntries,
|
||||||
@ -758,8 +745,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Paint a 4-bit/pixel code string, as defined by ETSI EN 300 743 7.2.5.2, to a canvas. */
|
/** Paint a 4-bit/pixel code string, as defined by ETSI EN 300 743 7.2.5.2, to a canvas. */
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private static int paint4BitPixelCodeString(
|
private static int paint4BitPixelCodeString(
|
||||||
ParsableBitArray data,
|
ParsableBitArray data,
|
||||||
int[] clutEntries,
|
int[] clutEntries,
|
||||||
@ -818,8 +803,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Paint an 8-bit/pixel code string, as defined by ETSI EN 300 743 7.2.5.2, to a canvas. */
|
/** Paint an 8-bit/pixel code string, as defined by ETSI EN 300 743 7.2.5.2, to a canvas. */
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private static int paint8BitPixelCodeString(
|
private static int paint8BitPixelCodeString(
|
||||||
ParsableBitArray data,
|
ParsableBitArray data,
|
||||||
int[] clutEntries,
|
int[] clutEntries,
|
||||||
|
@ -180,10 +180,7 @@ public final class SsaDecoder extends SimpleSubtitleDecoder {
|
|||||||
*/
|
*/
|
||||||
private static Map<String, SsaStyle> parseStyles(ParsableByteArray data) {
|
private static Map<String, SsaStyle> parseStyles(ParsableByteArray data) {
|
||||||
Map<String, SsaStyle> styles = new LinkedHashMap<>();
|
Map<String, SsaStyle> styles = new LinkedHashMap<>();
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable SsaStyle.Format formatInfo = null;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
SsaStyle.Format formatInfo = null;
|
|
||||||
@Nullable String currentLine;
|
@Nullable String currentLine;
|
||||||
while ((currentLine = data.readLine()) != null
|
while ((currentLine = data.readLine()) != null
|
||||||
&& (data.bytesLeft() == 0 || data.peekUnsignedByte() != '[')) {
|
&& (data.bytesLeft() == 0 || data.peekUnsignedByte() != '[')) {
|
||||||
@ -332,8 +329,6 @@ public final class SsaDecoder extends SimpleSubtitleDecoder {
|
|||||||
return cue.build();
|
return cue.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private static Layout.Alignment toTextAlignment(@SsaStyle.SsaAlignment int alignment) {
|
private static Layout.Alignment toTextAlignment(@SsaStyle.SsaAlignment int alignment) {
|
||||||
switch (alignment) {
|
switch (alignment) {
|
||||||
|
@ -84,11 +84,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
@Nullable private String id;
|
@Nullable private String id;
|
||||||
@RubyType private int rubyType;
|
@RubyType private int rubyType;
|
||||||
@RubySpan.Position private int rubyPosition;
|
@RubySpan.Position private int rubyPosition;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private Layout.Alignment textAlign;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private Layout.Alignment textAlign;
|
|
||||||
|
|
||||||
@OptionalBoolean private int textCombine;
|
@OptionalBoolean private int textCombine;
|
||||||
|
|
||||||
public TtmlStyle() {
|
public TtmlStyle() {
|
||||||
@ -283,15 +279,11 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
return rubyPosition;
|
return rubyPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public Layout.Alignment getTextAlign() {
|
public Layout.Alignment getTextAlign() {
|
||||||
return textAlign;
|
return textAlign;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
public TtmlStyle setTextAlign(@Nullable Layout.Alignment textAlign) {
|
public TtmlStyle setTextAlign(@Nullable Layout.Alignment textAlign) {
|
||||||
this.textAlign = textAlign;
|
this.textAlign = textAlign;
|
||||||
return this;
|
return this;
|
||||||
|
@ -31,10 +31,7 @@ public final class AesCipherDataSink implements DataSink {
|
|||||||
|
|
||||||
private final DataSink wrappedDataSink;
|
private final DataSink wrappedDataSink;
|
||||||
private final byte[] secretKey;
|
private final byte[] secretKey;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable private final byte[] scratch;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
private final byte[] scratch;
|
|
||||||
|
|
||||||
@Nullable private AesFlushingCipher cipher;
|
@Nullable private AesFlushingCipher cipher;
|
||||||
|
|
||||||
@ -62,8 +59,6 @@ public final class AesCipherDataSink implements DataSink {
|
|||||||
* cipher calls will be required to complete the operation. If {@code null} then encryption
|
* cipher calls will be required to complete the operation. If {@code null} then encryption
|
||||||
* will overwrite the input {@code data}.
|
* will overwrite the input {@code data}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public AesCipherDataSink(byte[] secretKey, DataSink wrappedDataSink, @Nullable byte[] scratch) {
|
public AesCipherDataSink(byte[] secretKey, DataSink wrappedDataSink, @Nullable byte[] scratch) {
|
||||||
this.wrappedDataSink = wrappedDataSink;
|
this.wrappedDataSink = wrappedDataSink;
|
||||||
this.secretKey = secretKey;
|
this.secretKey = secretKey;
|
||||||
|
@ -52,7 +52,5 @@ public interface Clock {
|
|||||||
*
|
*
|
||||||
* @see Handler#Handler(Looper, Handler.Callback)
|
* @see Handler#Handler(Looper, Handler.Callback)
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
HandlerWrapper createHandler(Looper looper, @Nullable Handler.Callback callback);
|
HandlerWrapper createHandler(Looper looper, @Nullable Handler.Callback callback);
|
||||||
}
|
}
|
||||||
|
@ -50,11 +50,7 @@ public class VideoDecoderOutputBuffer extends OutputBuffer {
|
|||||||
/** YUV planes for YUV mode. */
|
/** YUV planes for YUV mode. */
|
||||||
@Nullable public ByteBuffer[] yuvPlanes;
|
@Nullable public ByteBuffer[] yuvPlanes;
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable public int[] yuvStrides;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
public int[] yuvStrides;
|
|
||||||
|
|
||||||
public int colorspace;
|
public int colorspace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -106,10 +106,7 @@ public final class CameraMotionRenderer extends BaseRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buffer.flip();
|
buffer.flip();
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable float[] rotation = parseMetadata(Util.castNonNull(buffer.data));
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
float[] rotation = parseMetadata(Util.castNonNull(buffer.data));
|
|
||||||
if (rotation == null) {
|
if (rotation == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -128,8 +125,6 @@ public final class CameraMotionRenderer extends BaseRenderer {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private float[] parseMetadata(ByteBuffer data) {
|
private float[] parseMetadata(ByteBuffer data) {
|
||||||
if (data.remaining() != 16) {
|
if (data.remaining() != 16) {
|
||||||
|
@ -236,8 +236,6 @@ public final class PlayerEmsgHandler implements Handler.Callback {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
private @Nullable Map.Entry<Long, Long> ceilingExpiryEntryForPublishTime(long publishTimeMs) {
|
private @Nullable Map.Entry<Long, Long> ceilingExpiryEntryForPublishTime(long publishTimeMs) {
|
||||||
return manifestPublishTimeToExpiryTimeUs.ceilingEntry(publishTimeMs);
|
return manifestPublishTimeToExpiryTimeUs.ceilingEntry(publishTimeMs);
|
||||||
}
|
}
|
||||||
|
@ -92,10 +92,7 @@ import com.google.android.exoplayer2.util.Util;
|
|||||||
* Entries are in the range [0, 255], but are stored as long integers for convenience. Null if the
|
* Entries are in the range [0, 255], but are stored as long integers for convenience. Null if the
|
||||||
* table of contents was missing from the header, in which case seeking is not be supported.
|
* table of contents was missing from the header, in which case seeking is not be supported.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable private final long[] tableOfContents;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
private final long[] tableOfContents;
|
|
||||||
|
|
||||||
private XingSeeker(long dataStartPosition, int xingFrameSize, long durationUs) {
|
private XingSeeker(long dataStartPosition, int xingFrameSize, long durationUs) {
|
||||||
this(
|
this(
|
||||||
@ -106,8 +103,6 @@ import com.google.android.exoplayer2.util.Util;
|
|||||||
/* tableOfContents= */ null);
|
/* tableOfContents= */ null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private XingSeeker(
|
private XingSeeker(
|
||||||
long dataStartPosition,
|
long dataStartPosition,
|
||||||
int xingFrameSize,
|
int xingFrameSize,
|
||||||
|
@ -170,8 +170,6 @@ public final class PesReader implements TsPayloadReader {
|
|||||||
* @param targetLength The target length of the read.
|
* @param targetLength The target length of the read.
|
||||||
* @return Whether the target length has been reached.
|
* @return Whether the target length has been reached.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private boolean continueRead(
|
private boolean continueRead(
|
||||||
ParsableByteArray source, @Nullable byte[] target, int targetLength) {
|
ParsableByteArray source, @Nullable byte[] target, int targetLength) {
|
||||||
int bytesToRead = min(source.bytesLeft(), targetLength - bytesRead);
|
int bytesToRead = min(source.bytesLeft(), targetLength - bytesRead);
|
||||||
|
@ -159,10 +159,7 @@ public final class HlsDownloader extends SegmentDownloader<HlsPlaylist> {
|
|||||||
// Generating an incomplete segment list is allowed. Advance to the next media playlist.
|
// Generating an incomplete segment list is allowed. Advance to the next media playlist.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable HlsMediaPlaylist.Segment lastInitSegment = null;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
HlsMediaPlaylist.Segment lastInitSegment = null;
|
|
||||||
List<HlsMediaPlaylist.Segment> hlsSegments = mediaPlaylist.segments;
|
List<HlsMediaPlaylist.Segment> hlsSegments = mediaPlaylist.segments;
|
||||||
for (int i = 0; i < hlsSegments.size(); i++) {
|
for (int i = 0; i < hlsSegments.size(); i++) {
|
||||||
HlsMediaPlaylist.Segment segment = hlsSegments.get(i);
|
HlsMediaPlaylist.Segment segment = hlsSegments.get(i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user