mirror of
https://github.com/androidx/media.git
synced 2025-05-16 12:09:50 +08:00
Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
LSC: go/checker-lsc Tested: tap_presubmit: http://test/OCL:342788975:BASE:342885903:1605667635149:7731b723 Some tests failed; test failures are believed to be unrelated to this CL PiperOrigin-RevId: 343129490
This commit is contained in:
parent
7cf0620231
commit
db8356a17c
@ -39,7 +39,11 @@ public final class ClippingMediaPeriod implements MediaPeriod, MediaPeriod.Callb
|
|||||||
*/
|
*/
|
||||||
public final MediaPeriod mediaPeriod;
|
public final MediaPeriod mediaPeriod;
|
||||||
|
|
||||||
@Nullable private MediaPeriod.Callback callback;
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
private MediaPeriod.Callback callback;
|
||||||
|
|
||||||
private @NullableType ClippingSampleStream[] sampleStreams;
|
private @NullableType ClippingSampleStream[] sampleStreams;
|
||||||
private long pendingInitialDiscontinuityPositionUs;
|
private long pendingInitialDiscontinuityPositionUs;
|
||||||
/* package */ long startUs;
|
/* package */ long startUs;
|
||||||
|
@ -253,6 +253,8 @@ public final class DefaultMediaSourceFactory implements MediaSourceFactory {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
@Override
|
@Override
|
||||||
public DefaultMediaSourceFactory setDrmHttpDataSourceFactory(
|
public DefaultMediaSourceFactory setDrmHttpDataSourceFactory(
|
||||||
@Nullable HttpDataSource.Factory drmHttpDataSourceFactory) {
|
@Nullable HttpDataSource.Factory drmHttpDataSourceFactory) {
|
||||||
@ -389,6 +391,8 @@ public final class DefaultMediaSourceFactory implements MediaSourceFactory {
|
|||||||
|
|
||||||
private MediaSource maybeWrapWithAdsMediaSource(MediaItem mediaItem, MediaSource mediaSource) {
|
private MediaSource maybeWrapWithAdsMediaSource(MediaItem mediaItem, MediaSource mediaSource) {
|
||||||
Assertions.checkNotNull(mediaItem.playbackProperties);
|
Assertions.checkNotNull(mediaItem.playbackProperties);
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
@Nullable
|
@Nullable
|
||||||
MediaItem.AdsConfiguration adsConfiguration = mediaItem.playbackProperties.adsConfiguration;
|
MediaItem.AdsConfiguration adsConfiguration = mediaItem.playbackProperties.adsConfiguration;
|
||||||
if (adsConfiguration == null) {
|
if (adsConfiguration == null) {
|
||||||
|
@ -172,6 +172,8 @@ public final class ExtractorMediaSource extends CompositeMediaSource<Void> {
|
|||||||
/**
|
/**
|
||||||
* @deprecated Use {@link ProgressiveMediaSource.Factory#setDrmHttpDataSourceFactory} instead.
|
* @deprecated Use {@link ProgressiveMediaSource.Factory#setDrmHttpDataSourceFactory} instead.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public MediaSourceFactory setDrmHttpDataSourceFactory(
|
public MediaSourceFactory setDrmHttpDataSourceFactory(
|
||||||
|
@ -34,7 +34,11 @@ import java.util.Map;
|
|||||||
/** A helper to create a {@link DrmSessionManager} from a {@link MediaItem}. */
|
/** A helper to create a {@link DrmSessionManager} from a {@link MediaItem}. */
|
||||||
public final class MediaSourceDrmHelper {
|
public final class MediaSourceDrmHelper {
|
||||||
|
|
||||||
@Nullable private HttpDataSource.Factory drmHttpDataSourceFactory;
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
private HttpDataSource.Factory drmHttpDataSourceFactory;
|
||||||
|
|
||||||
@Nullable private String userAgent;
|
@Nullable private String userAgent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,6 +49,8 @@ public final class MediaSourceDrmHelper {
|
|||||||
* @param drmHttpDataSourceFactory The HTTP data source factory or {@code null} to use {@link
|
* @param drmHttpDataSourceFactory The HTTP data source factory or {@code null} to use {@link
|
||||||
* DefaultHttpDataSourceFactory}.
|
* DefaultHttpDataSourceFactory}.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
public void setDrmHttpDataSourceFactory(
|
public void setDrmHttpDataSourceFactory(
|
||||||
@Nullable HttpDataSource.Factory drmHttpDataSourceFactory) {
|
@Nullable HttpDataSource.Factory drmHttpDataSourceFactory) {
|
||||||
this.drmHttpDataSourceFactory = drmHttpDataSourceFactory;
|
this.drmHttpDataSourceFactory = drmHttpDataSourceFactory;
|
||||||
@ -65,6 +71,8 @@ public final class MediaSourceDrmHelper {
|
|||||||
/** Creates a {@link DrmSessionManager} for the given media item. */
|
/** Creates a {@link DrmSessionManager} for the given media item. */
|
||||||
public DrmSessionManager create(MediaItem mediaItem) {
|
public DrmSessionManager create(MediaItem mediaItem) {
|
||||||
Assertions.checkNotNull(mediaItem.playbackProperties);
|
Assertions.checkNotNull(mediaItem.playbackProperties);
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
@Nullable
|
@Nullable
|
||||||
MediaItem.DrmConfiguration drmConfiguration = mediaItem.playbackProperties.drmConfiguration;
|
MediaItem.DrmConfiguration drmConfiguration = mediaItem.playbackProperties.drmConfiguration;
|
||||||
if (drmConfiguration == null || Util.SDK_INT < 18) {
|
if (drmConfiguration == null || Util.SDK_INT < 18) {
|
||||||
|
@ -77,6 +77,8 @@ public interface MediaSourceFactory {
|
|||||||
* DefaultHttpDataSourceFactory}.
|
* DefaultHttpDataSourceFactory}.
|
||||||
* @return This factory, for convenience.
|
* @return This factory, for convenience.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
MediaSourceFactory setDrmHttpDataSourceFactory(
|
MediaSourceFactory setDrmHttpDataSourceFactory(
|
||||||
@Nullable HttpDataSource.Factory drmHttpDataSourceFactory);
|
@Nullable HttpDataSource.Factory drmHttpDataSourceFactory);
|
||||||
|
|
||||||
|
@ -153,6 +153,8 @@ public final class ProgressiveMediaSource extends BaseMediaSource
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
@Override
|
@Override
|
||||||
public Factory setDrmHttpDataSourceFactory(
|
public Factory setDrmHttpDataSourceFactory(
|
||||||
@Nullable HttpDataSource.Factory drmHttpDataSourceFactory) {
|
@Nullable HttpDataSource.Factory drmHttpDataSourceFactory) {
|
||||||
|
@ -406,7 +406,10 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
|
|
||||||
private final StatsDataSource dataSource;
|
private final StatsDataSource dataSource;
|
||||||
|
|
||||||
@Nullable private byte[] sampleData;
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
private byte[] sampleData;
|
||||||
|
|
||||||
public SourceLoadable(DataSpec dataSpec, DataSource dataSource) {
|
public SourceLoadable(DataSpec dataSpec, DataSource dataSource) {
|
||||||
this.loadTaskId = LoadEventInfo.getNewId();
|
this.loadTaskId = LoadEventInfo.getNewId();
|
||||||
|
@ -57,14 +57,25 @@ public final class CacheDataSource implements DataSource {
|
|||||||
|
|
||||||
private @MonotonicNonNull Cache cache;
|
private @MonotonicNonNull Cache cache;
|
||||||
private DataSource.Factory cacheReadDataSourceFactory;
|
private DataSource.Factory cacheReadDataSourceFactory;
|
||||||
@Nullable private DataSink.Factory cacheWriteDataSinkFactory;
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
private DataSink.Factory cacheWriteDataSinkFactory;
|
||||||
|
|
||||||
private CacheKeyFactory cacheKeyFactory;
|
private CacheKeyFactory cacheKeyFactory;
|
||||||
private boolean cacheIsReadOnly;
|
private boolean cacheIsReadOnly;
|
||||||
@Nullable private DataSource.Factory upstreamDataSourceFactory;
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
private DataSource.Factory upstreamDataSourceFactory;
|
||||||
|
|
||||||
@Nullable private PriorityTaskManager upstreamPriorityTaskManager;
|
@Nullable private PriorityTaskManager upstreamPriorityTaskManager;
|
||||||
private int upstreamPriority;
|
private int upstreamPriority;
|
||||||
@CacheDataSource.Flags private int flags;
|
@CacheDataSource.Flags private int flags;
|
||||||
@Nullable private CacheDataSource.EventListener eventListener;
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
private CacheDataSource.EventListener eventListener;
|
||||||
|
|
||||||
public Factory() {
|
public Factory() {
|
||||||
cacheReadDataSourceFactory = new FileDataSource.Factory();
|
cacheReadDataSourceFactory = new FileDataSource.Factory();
|
||||||
@ -117,6 +128,8 @@ public final class CacheDataSource implements DataSource {
|
|||||||
* DataSinks} for writing data to the cache, or {@code null} to disable writing.
|
* DataSinks} for writing data to the cache, or {@code null} to disable writing.
|
||||||
* @return This factory.
|
* @return This factory.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
public Factory setCacheWriteDataSinkFactory(
|
public Factory setCacheWriteDataSinkFactory(
|
||||||
@Nullable DataSink.Factory cacheWriteDataSinkFactory) {
|
@Nullable DataSink.Factory cacheWriteDataSinkFactory) {
|
||||||
this.cacheWriteDataSinkFactory = cacheWriteDataSinkFactory;
|
this.cacheWriteDataSinkFactory = cacheWriteDataSinkFactory;
|
||||||
@ -153,6 +166,8 @@ public final class CacheDataSource implements DataSource {
|
|||||||
* cache, or {@code null} to cause failure in the case of a cache miss.
|
* cache, or {@code null} to cause failure in the case of a cache miss.
|
||||||
* @return This factory.
|
* @return This factory.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
public Factory setUpstreamDataSourceFactory(
|
public Factory setUpstreamDataSourceFactory(
|
||||||
@Nullable DataSource.Factory upstreamDataSourceFactory) {
|
@Nullable DataSource.Factory upstreamDataSourceFactory) {
|
||||||
this.upstreamDataSourceFactory = upstreamDataSourceFactory;
|
this.upstreamDataSourceFactory = upstreamDataSourceFactory;
|
||||||
|
@ -28,8 +28,15 @@ public final class CacheDataSourceFactory implements DataSource.Factory {
|
|||||||
private final DataSource.Factory upstreamFactory;
|
private final DataSource.Factory upstreamFactory;
|
||||||
private final DataSource.Factory cacheReadDataSourceFactory;
|
private final DataSource.Factory cacheReadDataSourceFactory;
|
||||||
@CacheDataSource.Flags private final int flags;
|
@CacheDataSource.Flags private final int flags;
|
||||||
@Nullable private final DataSink.Factory cacheWriteDataSinkFactory;
|
// nullness annotations are not applicable to outer types
|
||||||
@Nullable private final CacheDataSource.EventListener eventListener;
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
private final DataSink.Factory cacheWriteDataSinkFactory;
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
private final CacheDataSource.EventListener eventListener;
|
||||||
|
|
||||||
@Nullable private final CacheKeyFactory cacheKeyFactory;
|
@Nullable private final CacheKeyFactory cacheKeyFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -60,6 +67,8 @@ public final class CacheDataSourceFactory implements DataSource.Factory {
|
|||||||
* @see CacheDataSource#CacheDataSource(Cache, DataSource, DataSource, DataSink, int,
|
* @see CacheDataSource#CacheDataSource(Cache, DataSource, DataSource, DataSink, int,
|
||||||
* CacheDataSource.EventListener)
|
* CacheDataSource.EventListener)
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
public CacheDataSourceFactory(
|
public CacheDataSourceFactory(
|
||||||
Cache cache,
|
Cache cache,
|
||||||
DataSource.Factory upstreamFactory,
|
DataSource.Factory upstreamFactory,
|
||||||
@ -81,6 +90,8 @@ public final class CacheDataSourceFactory implements DataSource.Factory {
|
|||||||
* @see CacheDataSource#CacheDataSource(Cache, DataSource, DataSource, DataSink, int,
|
* @see CacheDataSource#CacheDataSource(Cache, DataSource, DataSource, DataSink, int,
|
||||||
* CacheDataSource.EventListener, CacheKeyFactory)
|
* CacheDataSource.EventListener, CacheKeyFactory)
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
public CacheDataSourceFactory(
|
public CacheDataSourceFactory(
|
||||||
Cache cache,
|
Cache cache,
|
||||||
DataSource.Factory upstreamFactory,
|
DataSource.Factory upstreamFactory,
|
||||||
|
@ -73,6 +73,8 @@ public final class CacheWriter {
|
|||||||
* writer should instantiate its own internal temporary buffer.
|
* writer should instantiate its own internal temporary buffer.
|
||||||
* @param progressListener An optional progress listener.
|
* @param progressListener An optional progress listener.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
public CacheWriter(
|
public CacheWriter(
|
||||||
CacheDataSource dataSource,
|
CacheDataSource dataSource,
|
||||||
DataSpec dataSpec,
|
DataSpec dataSpec,
|
||||||
|
@ -153,6 +153,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
* enabled. This option is only useful for downgrading from database storage back to legacy
|
* enabled. This option is only useful for downgrading from database storage back to legacy
|
||||||
* storage.
|
* storage.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
public CachedContentIndex(
|
public CachedContentIndex(
|
||||||
@Nullable DatabaseProvider databaseProvider,
|
@Nullable DatabaseProvider databaseProvider,
|
||||||
@Nullable File legacyStorageDir,
|
@Nullable File legacyStorageDir,
|
||||||
@ -517,6 +519,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
private boolean changed;
|
private boolean changed;
|
||||||
@Nullable private ReusableBufferedOutputStream bufferedOutputStream;
|
@Nullable private ReusableBufferedOutputStream bufferedOutputStream;
|
||||||
|
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
public LegacyStorage(File file, @Nullable byte[] secretKey, boolean encrypt) {
|
public LegacyStorage(File file, @Nullable byte[] secretKey, boolean encrypt) {
|
||||||
checkState(secretKey != null || !encrypt);
|
checkState(secretKey != null || !encrypt);
|
||||||
@Nullable Cipher cipher = null;
|
@Nullable Cipher cipher = null;
|
||||||
|
@ -42,6 +42,8 @@ public interface ContentMetadata {
|
|||||||
* @param defaultValue Value to return if the metadata doesn't exist.
|
* @param defaultValue Value to return if the metadata doesn't exist.
|
||||||
* @return The metadata value.
|
* @return The metadata value.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
@Nullable
|
@Nullable
|
||||||
byte[] get(String key, @Nullable byte[] defaultValue);
|
byte[] get(String key, @Nullable byte[] defaultValue);
|
||||||
|
|
||||||
|
@ -63,10 +63,15 @@ public final class DefaultContentMetadata implements ContentMetadata {
|
|||||||
return metadata.entrySet();
|
return metadata.entrySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public final byte[] get(String name, @Nullable byte[] defaultValue) {
|
public final byte[] get(String name, @Nullable byte[] defaultValue) {
|
||||||
@Nullable byte[] bytes = metadata.get(name);
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
byte[] bytes = metadata.get(name);
|
||||||
if (bytes != null) {
|
if (bytes != null) {
|
||||||
return Arrays.copyOf(bytes, bytes.length);
|
return Arrays.copyOf(bytes, bytes.length);
|
||||||
} else {
|
} else {
|
||||||
@ -77,7 +82,10 @@ public final class DefaultContentMetadata implements ContentMetadata {
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public final String get(String name, @Nullable String defaultValue) {
|
public final String get(String name, @Nullable String defaultValue) {
|
||||||
@Nullable byte[] bytes = metadata.get(name);
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
byte[] bytes = metadata.get(name);
|
||||||
if (bytes != null) {
|
if (bytes != null) {
|
||||||
return new String(bytes, Charsets.UTF_8);
|
return new String(bytes, Charsets.UTF_8);
|
||||||
} else {
|
} else {
|
||||||
@ -87,7 +95,10 @@ public final class DefaultContentMetadata implements ContentMetadata {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final long get(String name, long defaultValue) {
|
public final long get(String name, long defaultValue) {
|
||||||
@Nullable byte[] bytes = metadata.get(name);
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
byte[] bytes = metadata.get(name);
|
||||||
if (bytes != null) {
|
if (bytes != null) {
|
||||||
return ByteBuffer.wrap(bytes).getLong();
|
return ByteBuffer.wrap(bytes).getLong();
|
||||||
} else {
|
} else {
|
||||||
@ -129,7 +140,10 @@ public final class DefaultContentMetadata implements ContentMetadata {
|
|||||||
}
|
}
|
||||||
for (Entry<String, byte[]> entry : first.entrySet()) {
|
for (Entry<String, byte[]> entry : first.entrySet()) {
|
||||||
byte[] value = entry.getValue();
|
byte[] value = entry.getValue();
|
||||||
@Nullable byte[] otherValue = second.get(entry.getKey());
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
byte[] otherValue = second.get(entry.getKey());
|
||||||
if (!Arrays.equals(value, otherValue)) {
|
if (!Arrays.equals(value, otherValue)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -177,9 +177,18 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public static Metadata parseMdtaFromMeta(Atom.ContainerAtom meta) {
|
public static Metadata parseMdtaFromMeta(Atom.ContainerAtom meta) {
|
||||||
@Nullable Atom.LeafAtom hdlrAtom = meta.getLeafAtomOfType(Atom.TYPE_hdlr);
|
// nullness annotations are not applicable to outer types
|
||||||
@Nullable Atom.LeafAtom keysAtom = meta.getLeafAtomOfType(Atom.TYPE_keys);
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
@Nullable Atom.LeafAtom ilstAtom = meta.getLeafAtomOfType(Atom.TYPE_ilst);
|
@Nullable
|
||||||
|
Atom.LeafAtom hdlrAtom = meta.getLeafAtomOfType(Atom.TYPE_hdlr);
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.LeafAtom keysAtom = meta.getLeafAtomOfType(Atom.TYPE_keys);
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.LeafAtom ilstAtom = meta.getLeafAtomOfType(Atom.TYPE_ilst);
|
||||||
if (hdlrAtom == null
|
if (hdlrAtom == null
|
||||||
|| keysAtom == null
|
|| keysAtom == null
|
||||||
|| ilstAtom == null
|
|| ilstAtom == null
|
||||||
@ -210,6 +219,8 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
int keyIndex = ilst.readInt() - 1;
|
int keyIndex = ilst.readInt() - 1;
|
||||||
if (keyIndex >= 0 && keyIndex < keyNames.length) {
|
if (keyIndex >= 0 && keyIndex < keyNames.length) {
|
||||||
String key = keyNames[keyIndex];
|
String key = keyNames[keyIndex];
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
@Nullable
|
@Nullable
|
||||||
Metadata.Entry entry =
|
Metadata.Entry entry =
|
||||||
MetadataUtil.parseMdtaMetadataEntryFromIlst(ilst, atomPosition + atomSize, key);
|
MetadataUtil.parseMdtaMetadataEntryFromIlst(ilst, atomPosition + atomSize, key);
|
||||||
@ -279,10 +290,19 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
mdhdData.second,
|
mdhdData.second,
|
||||||
drmInitData,
|
drmInitData,
|
||||||
isQuickTime);
|
isQuickTime);
|
||||||
@Nullable long[] editListDurations = null;
|
// nullness annotations are not applicable to primitive types
|
||||||
@Nullable long[] editListMediaTimes = null;
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
long[] editListDurations = null;
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
long[] editListMediaTimes = null;
|
||||||
if (!ignoreEditLists) {
|
if (!ignoreEditLists) {
|
||||||
@Nullable Atom.ContainerAtom edtsAtom = trak.getContainerAtomOfType(Atom.TYPE_edts);
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.ContainerAtom edtsAtom = trak.getContainerAtomOfType(Atom.TYPE_edts);
|
||||||
if (edtsAtom != null) {
|
if (edtsAtom != null) {
|
||||||
@Nullable Pair<long[], long[]> edtsData = parseEdts(edtsAtom);
|
@Nullable Pair<long[], long[]> edtsData = parseEdts(edtsAtom);
|
||||||
if (edtsData != null) {
|
if (edtsData != null) {
|
||||||
@ -310,11 +330,17 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
Track track, Atom.ContainerAtom stblAtom, GaplessInfoHolder gaplessInfoHolder)
|
Track track, Atom.ContainerAtom stblAtom, GaplessInfoHolder gaplessInfoHolder)
|
||||||
throws ParserException {
|
throws ParserException {
|
||||||
SampleSizeBox sampleSizeBox;
|
SampleSizeBox sampleSizeBox;
|
||||||
@Nullable Atom.LeafAtom stszAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_stsz);
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.LeafAtom stszAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_stsz);
|
||||||
if (stszAtom != null) {
|
if (stszAtom != null) {
|
||||||
sampleSizeBox = new StszSampleSizeBox(stszAtom);
|
sampleSizeBox = new StszSampleSizeBox(stszAtom);
|
||||||
} else {
|
} else {
|
||||||
@Nullable Atom.LeafAtom stz2Atom = stblAtom.getLeafAtomOfType(Atom.TYPE_stz2);
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.LeafAtom stz2Atom = stblAtom.getLeafAtomOfType(Atom.TYPE_stz2);
|
||||||
if (stz2Atom == null) {
|
if (stz2Atom == null) {
|
||||||
throw new ParserException("Track has no sample table size information");
|
throw new ParserException("Track has no sample table size information");
|
||||||
}
|
}
|
||||||
@ -335,7 +361,10 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
|
|
||||||
// Entries are byte offsets of chunks.
|
// Entries are byte offsets of chunks.
|
||||||
boolean chunkOffsetsAreLongs = false;
|
boolean chunkOffsetsAreLongs = false;
|
||||||
@Nullable Atom.LeafAtom chunkOffsetsAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_stco);
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.LeafAtom chunkOffsetsAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_stco);
|
||||||
if (chunkOffsetsAtom == null) {
|
if (chunkOffsetsAtom == null) {
|
||||||
chunkOffsetsAreLongs = true;
|
chunkOffsetsAreLongs = true;
|
||||||
chunkOffsetsAtom = checkNotNull(stblAtom.getLeafAtomOfType(Atom.TYPE_co64));
|
chunkOffsetsAtom = checkNotNull(stblAtom.getLeafAtomOfType(Atom.TYPE_co64));
|
||||||
@ -346,10 +375,16 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
// Entries are (number of samples, timestamp delta between those samples).
|
// Entries are (number of samples, timestamp delta between those samples).
|
||||||
ParsableByteArray stts = checkNotNull(stblAtom.getLeafAtomOfType(Atom.TYPE_stts)).data;
|
ParsableByteArray stts = checkNotNull(stblAtom.getLeafAtomOfType(Atom.TYPE_stts)).data;
|
||||||
// Entries are the indices of samples that are synchronization samples.
|
// Entries are the indices of samples that are synchronization samples.
|
||||||
@Nullable Atom.LeafAtom stssAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_stss);
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.LeafAtom stssAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_stss);
|
||||||
@Nullable ParsableByteArray stss = stssAtom != null ? stssAtom.data : null;
|
@Nullable ParsableByteArray stss = stssAtom != null ? stssAtom.data : null;
|
||||||
// Entries are (number of samples, timestamp offset).
|
// Entries are (number of samples, timestamp offset).
|
||||||
@Nullable Atom.LeafAtom cttsAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_ctts);
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.LeafAtom cttsAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_ctts);
|
||||||
@Nullable ParsableByteArray ctts = cttsAtom != null ? cttsAtom.data : null;
|
@Nullable ParsableByteArray ctts = cttsAtom != null ? cttsAtom.data : null;
|
||||||
|
|
||||||
// Prepare to read chunk information.
|
// Prepare to read chunk information.
|
||||||
@ -693,7 +728,10 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
ilst.skipBytes(Atom.HEADER_SIZE);
|
ilst.skipBytes(Atom.HEADER_SIZE);
|
||||||
ArrayList<Metadata.Entry> entries = new ArrayList<>();
|
ArrayList<Metadata.Entry> entries = new ArrayList<>();
|
||||||
while (ilst.getPosition() < limit) {
|
while (ilst.getPosition() < limit) {
|
||||||
@Nullable Metadata.Entry entry = MetadataUtil.parseIlstElement(ilst);
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Metadata.Entry entry = MetadataUtil.parseIlstElement(ilst);
|
||||||
if (entry != null) {
|
if (entry != null) {
|
||||||
entries.add(entry);
|
entries.add(entry);
|
||||||
}
|
}
|
||||||
@ -996,7 +1034,10 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
@Nullable List<byte[]> initializationData = null;
|
@Nullable List<byte[]> initializationData = null;
|
||||||
@Nullable String mimeType = null;
|
@Nullable String mimeType = null;
|
||||||
@Nullable String codecs = null;
|
@Nullable String codecs = null;
|
||||||
@Nullable byte[] projectionData = null;
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
byte[] projectionData = null;
|
||||||
@C.StereoMode
|
@C.StereoMode
|
||||||
int stereoMode = Format.NO_VALUE;
|
int stereoMode = Format.NO_VALUE;
|
||||||
while (childPosition - position < size) {
|
while (childPosition - position < size) {
|
||||||
@ -1046,7 +1087,10 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
Pair<@NullableType String, byte @NullableType []> mimeTypeAndInitializationDataBytes =
|
Pair<@NullableType String, byte @NullableType []> mimeTypeAndInitializationDataBytes =
|
||||||
parseEsdsFromParent(parent, childStartPosition);
|
parseEsdsFromParent(parent, childStartPosition);
|
||||||
mimeType = mimeTypeAndInitializationDataBytes.first;
|
mimeType = mimeTypeAndInitializationDataBytes.first;
|
||||||
@Nullable byte[] initializationDataBytes = mimeTypeAndInitializationDataBytes.second;
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
byte[] initializationDataBytes = mimeTypeAndInitializationDataBytes.second;
|
||||||
if (initializationDataBytes != null) {
|
if (initializationDataBytes != null) {
|
||||||
initializationData = ImmutableList.of(initializationDataBytes);
|
initializationData = ImmutableList.of(initializationDataBytes);
|
||||||
}
|
}
|
||||||
@ -1123,7 +1167,10 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
private static Pair<long[], long[]> parseEdts(Atom.ContainerAtom edtsAtom) {
|
private static Pair<long[], long[]> parseEdts(Atom.ContainerAtom edtsAtom) {
|
||||||
@Nullable Atom.LeafAtom elstAtom = edtsAtom.getLeafAtomOfType(Atom.TYPE_elst);
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.LeafAtom elstAtom = edtsAtom.getLeafAtomOfType(Atom.TYPE_elst);
|
||||||
if (elstAtom == null) {
|
if (elstAtom == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -1273,7 +1320,10 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
Pair<@NullableType String, byte @NullableType []> mimeTypeAndInitializationData =
|
Pair<@NullableType String, byte @NullableType []> mimeTypeAndInitializationData =
|
||||||
parseEsdsFromParent(parent, esdsAtomPosition);
|
parseEsdsFromParent(parent, esdsAtomPosition);
|
||||||
mimeType = mimeTypeAndInitializationData.first;
|
mimeType = mimeTypeAndInitializationData.first;
|
||||||
@Nullable byte[] initializationDataBytes = mimeTypeAndInitializationData.second;
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
byte[] initializationDataBytes = mimeTypeAndInitializationData.second;
|
||||||
if (initializationDataBytes != null) {
|
if (initializationDataBytes != null) {
|
||||||
if (MimeTypes.AUDIO_AAC.equals(mimeType)) {
|
if (MimeTypes.AUDIO_AAC.equals(mimeType)) {
|
||||||
// Update sampleRate and channelCount from the AudioSpecificConfig initialization
|
// Update sampleRate and channelCount from the AudioSpecificConfig initialization
|
||||||
@ -1528,6 +1578,8 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Parses the proj box from sv3d box, as specified by https://github.com/google/spatial-media. */
|
/** Parses the proj box from sv3d box, as specified by https://github.com/google/spatial-media. */
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
@Nullable
|
@Nullable
|
||||||
private static byte[] parseProjFromParent(ParsableByteArray parent, int position, int size) {
|
private static byte[] parseProjFromParent(ParsableByteArray parent, int position, int size) {
|
||||||
int childPosition = position + Atom.HEADER_SIZE;
|
int childPosition = position + Atom.HEADER_SIZE;
|
||||||
|
@ -1166,7 +1166,10 @@ public class FragmentedMp4Extractor implements Extractor {
|
|||||||
int perSampleIvSize = sgpd.readUnsignedByte();
|
int perSampleIvSize = sgpd.readUnsignedByte();
|
||||||
byte[] keyId = new byte[16];
|
byte[] keyId = new byte[16];
|
||||||
sgpd.readBytes(keyId, 0, keyId.length);
|
sgpd.readBytes(keyId, 0, keyId.length);
|
||||||
@Nullable byte[] constantIv = null;
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
byte[] constantIv = null;
|
||||||
if (perSampleIvSize == 0) {
|
if (perSampleIvSize == 0) {
|
||||||
int constantIvSize = sgpd.readUnsignedByte();
|
int constantIvSize = sgpd.readUnsignedByte();
|
||||||
constantIv = new byte[constantIvSize];
|
constantIv = new byte[constantIvSize];
|
||||||
@ -1414,7 +1417,10 @@ public class FragmentedMp4Extractor implements Extractor {
|
|||||||
@C.BufferFlags int sampleFlags = trackBundle.getCurrentSampleFlags();
|
@C.BufferFlags int sampleFlags = trackBundle.getCurrentSampleFlags();
|
||||||
|
|
||||||
// Encryption data.
|
// Encryption data.
|
||||||
@Nullable TrackOutput.CryptoData cryptoData = null;
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
TrackOutput.CryptoData cryptoData = null;
|
||||||
@Nullable TrackEncryptionBox encryptionBox = trackBundle.getEncryptionBoxIfEncrypted();
|
@Nullable TrackEncryptionBox encryptionBox = trackBundle.getEncryptionBoxIfEncrypted();
|
||||||
if (encryptionBox != null) {
|
if (encryptionBox != null) {
|
||||||
cryptoData = encryptionBox.cryptoData;
|
cryptoData = encryptionBox.cryptoData;
|
||||||
|
@ -341,6 +341,8 @@ import java.util.List;
|
|||||||
* @param ilst Holds the data to be parsed.
|
* @param ilst Holds the data to be parsed.
|
||||||
* @return The parsed element, or null if the element's type was not recognized.
|
* @return The parsed element, or null if the element's type was not recognized.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
@Nullable
|
@Nullable
|
||||||
public static Metadata.Entry parseIlstElement(ParsableByteArray ilst) {
|
public static Metadata.Entry parseIlstElement(ParsableByteArray ilst) {
|
||||||
int position = ilst.getPosition();
|
int position = ilst.getPosition();
|
||||||
|
@ -464,7 +464,10 @@ public final class Mp4Extractor implements Extractor, SeekMap {
|
|||||||
@Nullable Metadata udtaMetadata = null;
|
@Nullable Metadata udtaMetadata = null;
|
||||||
boolean isQuickTime = fileType == FILE_TYPE_QUICKTIME;
|
boolean isQuickTime = fileType == FILE_TYPE_QUICKTIME;
|
||||||
GaplessInfoHolder gaplessInfoHolder = new GaplessInfoHolder();
|
GaplessInfoHolder gaplessInfoHolder = new GaplessInfoHolder();
|
||||||
@Nullable Atom.LeafAtom udta = moov.getLeafAtomOfType(Atom.TYPE_udta);
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.LeafAtom udta = moov.getLeafAtomOfType(Atom.TYPE_udta);
|
||||||
if (udta != null) {
|
if (udta != null) {
|
||||||
udtaMetadata = AtomParsers.parseUdta(udta, isQuickTime);
|
udtaMetadata = AtomParsers.parseUdta(udta, isQuickTime);
|
||||||
if (udtaMetadata != null) {
|
if (udtaMetadata != null) {
|
||||||
@ -472,7 +475,10 @@ public final class Mp4Extractor implements Extractor, SeekMap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Nullable Metadata mdtaMetadata = null;
|
@Nullable Metadata mdtaMetadata = null;
|
||||||
@Nullable Atom.ContainerAtom meta = moov.getContainerAtomOfType(Atom.TYPE_meta);
|
// nullness annotations are not applicable to outer types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.outer")
|
||||||
|
@Nullable
|
||||||
|
Atom.ContainerAtom meta = moov.getContainerAtomOfType(Atom.TYPE_meta);
|
||||||
if (meta != null) {
|
if (meta != null) {
|
||||||
mdtaMetadata = AtomParsers.parseMdtaFromMeta(meta);
|
mdtaMetadata = AtomParsers.parseMdtaFromMeta(meta);
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,8 @@ public final class PsshAtomUtil {
|
|||||||
* @param data The scheme specific data.
|
* @param data The scheme specific data.
|
||||||
* @return The PSSH atom.
|
* @return The PSSH atom.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
public static byte[] buildPsshAtom(UUID systemId, @Nullable byte[] data) {
|
public static byte[] buildPsshAtom(UUID systemId, @Nullable byte[] data) {
|
||||||
return buildPsshAtom(systemId, null, data);
|
return buildPsshAtom(systemId, null, data);
|
||||||
}
|
}
|
||||||
@ -49,6 +51,8 @@ public final class PsshAtomUtil {
|
|||||||
* @param data The scheme specific data.
|
* @param data The scheme specific data.
|
||||||
* @return The PSSH atom.
|
* @return The PSSH atom.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
public static byte[] buildPsshAtom(
|
public static byte[] buildPsshAtom(
|
||||||
UUID systemId, @Nullable UUID[] keyIds, @Nullable byte[] data) {
|
UUID systemId, @Nullable UUID[] keyIds, @Nullable byte[] data) {
|
||||||
int dataLength = data != null ? data.length : 0;
|
int dataLength = data != null ? data.length : 0;
|
||||||
@ -132,6 +136,8 @@ public final class PsshAtomUtil {
|
|||||||
* @return The parsed scheme specific data. Null if the input is not a valid PSSH atom, or if the
|
* @return The parsed scheme specific data. Null if the input is not a valid PSSH atom, or if the
|
||||||
* PSSH atom has an unsupported version, or if the PSSH atom does not match the passed UUID.
|
* PSSH atom has an unsupported version, or if the PSSH atom does not match the passed UUID.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
@Nullable
|
@Nullable
|
||||||
public static byte[] parseSchemeSpecificData(byte[] atom, UUID uuid) {
|
public static byte[] parseSchemeSpecificData(byte[] atom, UUID uuid) {
|
||||||
@Nullable PsshAtom parsedAtom = parsePsshAtom(atom);
|
@Nullable PsshAtom parsedAtom = parsePsshAtom(atom);
|
||||||
|
@ -81,15 +81,17 @@ public final class Track {
|
|||||||
*/
|
*/
|
||||||
@Transformation public final int sampleTransformation;
|
@Transformation public final int sampleTransformation;
|
||||||
|
|
||||||
/**
|
/** Durations of edit list segments in the movie timescale. Null if there is no edit list. */
|
||||||
* Durations of edit list segments in the movie timescale. Null if there is no edit list.
|
// nullness annotations are not applicable to primitive types
|
||||||
*/
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
@Nullable public final long[] editListDurations;
|
@Nullable
|
||||||
|
public final long[] editListDurations;
|
||||||
|
|
||||||
/**
|
/** Media times for edit list segments in the track timescale. Null if there is no edit list. */
|
||||||
* Media times for edit list segments in the track timescale. Null if there is no edit list.
|
// nullness annotations are not applicable to primitive types
|
||||||
*/
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
@Nullable public final long[] editListMediaTimes;
|
@Nullable
|
||||||
|
public final long[] editListMediaTimes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For H264 video tracks, the length in bytes of the NALUnitLength field in each sample. 0 for
|
* For H264 video tracks, the length in bytes of the NALUnitLength field in each sample. 0 for
|
||||||
@ -99,10 +101,20 @@ public final class Track {
|
|||||||
|
|
||||||
@Nullable private final TrackEncryptionBox[] sampleDescriptionEncryptionBoxes;
|
@Nullable private final TrackEncryptionBox[] sampleDescriptionEncryptionBoxes;
|
||||||
|
|
||||||
public Track(int id, int type, long timescale, long movieTimescale, long durationUs,
|
// nullness annotations are not applicable to primitive types
|
||||||
Format format, @Transformation int sampleTransformation,
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
@Nullable TrackEncryptionBox[] sampleDescriptionEncryptionBoxes, int nalUnitLengthFieldLength,
|
public Track(
|
||||||
@Nullable long[] editListDurations, @Nullable long[] editListMediaTimes) {
|
int id,
|
||||||
|
int type,
|
||||||
|
long timescale,
|
||||||
|
long movieTimescale,
|
||||||
|
long durationUs,
|
||||||
|
Format format,
|
||||||
|
@Transformation int sampleTransformation,
|
||||||
|
@Nullable TrackEncryptionBox[] sampleDescriptionEncryptionBoxes,
|
||||||
|
int nalUnitLengthFieldLength,
|
||||||
|
@Nullable long[] editListDurations,
|
||||||
|
@Nullable long[] editListMediaTimes) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.timescale = timescale;
|
this.timescale = timescale;
|
||||||
|
@ -52,7 +52,10 @@ public final class TrackEncryptionBox {
|
|||||||
* If {@link #perSampleIvSize} is 0, holds the default initialization vector as defined in the
|
* If {@link #perSampleIvSize} is 0, holds the default initialization vector as defined in the
|
||||||
* track encryption box or sample group description box. Null otherwise.
|
* track encryption box or sample group description box. Null otherwise.
|
||||||
*/
|
*/
|
||||||
@Nullable public final byte[] defaultInitializationVector;
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
|
@Nullable
|
||||||
|
public final byte[] defaultInitializationVector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param isEncrypted See {@link #isEncrypted}.
|
* @param isEncrypted See {@link #isEncrypted}.
|
||||||
@ -63,6 +66,8 @@ public final class TrackEncryptionBox {
|
|||||||
* @param defaultClearBlocks See {@link TrackOutput.CryptoData#clearBlocks}.
|
* @param defaultClearBlocks See {@link TrackOutput.CryptoData#clearBlocks}.
|
||||||
* @param defaultInitializationVector See {@link #defaultInitializationVector}.
|
* @param defaultInitializationVector See {@link #defaultInitializationVector}.
|
||||||
*/
|
*/
|
||||||
|
// nullness annotations are not applicable to primitive types
|
||||||
|
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||||
public TrackEncryptionBox(
|
public TrackEncryptionBox(
|
||||||
boolean isEncrypted,
|
boolean isEncrypted,
|
||||||
@Nullable String schemeType,
|
@Nullable String schemeType,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user