mirror of
https://github.com/androidx/media.git
synced 2025-05-04 06:00:37 +08:00
Rollback of db8356a17c
*** Original commit *** 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: 343251530
This commit is contained in:
parent
0191febbe6
commit
e5fd2eb088
@ -39,11 +39,7 @@ public final class ClippingMediaPeriod implements MediaPeriod, MediaPeriod.Callb
|
|||||||
*/
|
*/
|
||||||
public final MediaPeriod mediaPeriod;
|
public final MediaPeriod mediaPeriod;
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private MediaPeriod.Callback callback;
|
||||||
@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,8 +253,6 @@ 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) {
|
||||||
@ -391,8 +389,6 @@ 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,8 +172,6 @@ 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,11 +34,7 @@ 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 {
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private HttpDataSource.Factory drmHttpDataSourceFactory;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private HttpDataSource.Factory drmHttpDataSourceFactory;
|
|
||||||
|
|
||||||
@Nullable private String userAgent;
|
@Nullable private String userAgent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,8 +45,6 @@ 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;
|
||||||
@ -71,8 +65,6 @@ 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,8 +77,6 @@ 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,8 +153,6 @@ 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,10 +406,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
|
|
||||||
private final StatsDataSource dataSource;
|
private final StatsDataSource dataSource;
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable private byte[] sampleData;
|
||||||
@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,25 +57,14 @@ public final class CacheDataSource implements DataSource {
|
|||||||
|
|
||||||
private @MonotonicNonNull Cache cache;
|
private @MonotonicNonNull Cache cache;
|
||||||
private DataSource.Factory cacheReadDataSourceFactory;
|
private DataSource.Factory cacheReadDataSourceFactory;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private DataSink.Factory cacheWriteDataSinkFactory;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private DataSink.Factory cacheWriteDataSinkFactory;
|
|
||||||
|
|
||||||
private CacheKeyFactory cacheKeyFactory;
|
private CacheKeyFactory cacheKeyFactory;
|
||||||
private boolean cacheIsReadOnly;
|
private boolean cacheIsReadOnly;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private DataSource.Factory upstreamDataSourceFactory;
|
||||||
@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;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private CacheDataSource.EventListener eventListener;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private CacheDataSource.EventListener eventListener;
|
|
||||||
|
|
||||||
public Factory() {
|
public Factory() {
|
||||||
cacheReadDataSourceFactory = new FileDataSource.Factory();
|
cacheReadDataSourceFactory = new FileDataSource.Factory();
|
||||||
@ -128,8 +117,6 @@ 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;
|
||||||
@ -166,8 +153,6 @@ 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,15 +28,8 @@ 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;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private final DataSink.Factory cacheWriteDataSinkFactory;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
@Nullable private final CacheDataSource.EventListener eventListener;
|
||||||
@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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,8 +60,6 @@ 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,
|
||||||
@ -90,8 +81,6 @@ 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,8 +73,6 @@ 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,8 +153,6 @@ 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,
|
||||||
@ -519,8 +517,6 @@ 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,8 +42,6 @@ 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,15 +63,10 @@ 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) {
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable byte[] bytes = metadata.get(name);
|
||||||
@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 {
|
||||||
@ -82,10 +77,7 @@ 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) {
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable byte[] bytes = metadata.get(name);
|
||||||
@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 {
|
||||||
@ -95,10 +87,7 @@ public final class DefaultContentMetadata implements ContentMetadata {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final long get(String name, long defaultValue) {
|
public final long get(String name, long defaultValue) {
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable byte[] bytes = metadata.get(name);
|
||||||
@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 {
|
||||||
@ -140,10 +129,7 @@ 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();
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable byte[] otherValue = second.get(entry.getKey());
|
||||||
@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,18 +177,9 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public static Metadata parseMdtaFromMeta(Atom.ContainerAtom meta) {
|
public static Metadata parseMdtaFromMeta(Atom.ContainerAtom meta) {
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Atom.LeafAtom hdlrAtom = meta.getLeafAtomOfType(Atom.TYPE_hdlr);
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
@Nullable Atom.LeafAtom keysAtom = meta.getLeafAtomOfType(Atom.TYPE_keys);
|
||||||
@Nullable
|
@Nullable Atom.LeafAtom ilstAtom = meta.getLeafAtomOfType(Atom.TYPE_ilst);
|
||||||
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
|
||||||
@ -219,8 +210,6 @@ 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);
|
||||||
@ -290,19 +279,10 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
mdhdData.second,
|
mdhdData.second,
|
||||||
drmInitData,
|
drmInitData,
|
||||||
isQuickTime);
|
isQuickTime);
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable long[] editListDurations = null;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
@Nullable long[] editListMediaTimes = null;
|
||||||
@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) {
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Atom.ContainerAtom edtsAtom = trak.getContainerAtomOfType(Atom.TYPE_edts);
|
||||||
@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) {
|
||||||
@ -330,17 +310,11 @@ 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;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Atom.LeafAtom stszAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_stsz);
|
||||||
@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 {
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Atom.LeafAtom stz2Atom = stblAtom.getLeafAtomOfType(Atom.TYPE_stz2);
|
||||||
@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");
|
||||||
}
|
}
|
||||||
@ -361,10 +335,7 @@ 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;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Atom.LeafAtom chunkOffsetsAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_stco);
|
||||||
@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));
|
||||||
@ -375,16 +346,10 @@ 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.
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Atom.LeafAtom stssAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_stss);
|
||||||
@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).
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Atom.LeafAtom cttsAtom = stblAtom.getLeafAtomOfType(Atom.TYPE_ctts);
|
||||||
@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.
|
||||||
@ -728,10 +693,7 @@ 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) {
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Metadata.Entry entry = MetadataUtil.parseIlstElement(ilst);
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
Metadata.Entry entry = MetadataUtil.parseIlstElement(ilst);
|
|
||||||
if (entry != null) {
|
if (entry != null) {
|
||||||
entries.add(entry);
|
entries.add(entry);
|
||||||
}
|
}
|
||||||
@ -1034,10 +996,7 @@ 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;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable byte[] projectionData = null;
|
||||||
@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) {
|
||||||
@ -1087,10 +1046,7 @@ 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;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable byte[] initializationDataBytes = mimeTypeAndInitializationDataBytes.second;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
byte[] initializationDataBytes = mimeTypeAndInitializationDataBytes.second;
|
|
||||||
if (initializationDataBytes != null) {
|
if (initializationDataBytes != null) {
|
||||||
initializationData = ImmutableList.of(initializationDataBytes);
|
initializationData = ImmutableList.of(initializationDataBytes);
|
||||||
}
|
}
|
||||||
@ -1167,10 +1123,7 @@ 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) {
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Atom.LeafAtom elstAtom = edtsAtom.getLeafAtomOfType(Atom.TYPE_elst);
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
Atom.LeafAtom elstAtom = edtsAtom.getLeafAtomOfType(Atom.TYPE_elst);
|
|
||||||
if (elstAtom == null) {
|
if (elstAtom == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -1320,10 +1273,7 @@ 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;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable byte[] initializationDataBytes = mimeTypeAndInitializationData.second;
|
||||||
@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
|
||||||
@ -1578,8 +1528,6 @@ 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,10 +1166,7 @@ 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);
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable byte[] constantIv = null;
|
||||||
@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];
|
||||||
@ -1417,10 +1414,7 @@ public class FragmentedMp4Extractor implements Extractor {
|
|||||||
@C.BufferFlags int sampleFlags = trackBundle.getCurrentSampleFlags();
|
@C.BufferFlags int sampleFlags = trackBundle.getCurrentSampleFlags();
|
||||||
|
|
||||||
// Encryption data.
|
// Encryption data.
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable TrackOutput.CryptoData cryptoData = null;
|
||||||
@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,8 +341,6 @@ 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,10 +464,7 @@ 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();
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Atom.LeafAtom udta = moov.getLeafAtomOfType(Atom.TYPE_udta);
|
||||||
@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) {
|
||||||
@ -475,10 +472,7 @@ public final class Mp4Extractor implements Extractor, SeekMap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Nullable Metadata mdtaMetadata = null;
|
@Nullable Metadata mdtaMetadata = null;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Atom.ContainerAtom meta = moov.getContainerAtomOfType(Atom.TYPE_meta);
|
||||||
@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,8 +37,6 @@ 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);
|
||||||
}
|
}
|
||||||
@ -51,8 +49,6 @@ 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;
|
||||||
@ -136,8 +132,6 @@ 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,17 +81,15 @@ 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. */
|
/**
|
||||||
// nullness annotations are not applicable to primitive types
|
* Durations of edit list segments in the movie timescale. Null if there is no edit list.
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
*/
|
||||||
@Nullable
|
@Nullable public final long[] editListDurations;
|
||||||
public final long[] editListDurations;
|
|
||||||
|
|
||||||
/** 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
|
* Media times for edit list segments in the track timescale. Null if there is no edit list.
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
*/
|
||||||
@Nullable
|
@Nullable public final long[] editListMediaTimes;
|
||||||
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
|
||||||
@ -101,20 +99,10 @@ public final class Track {
|
|||||||
|
|
||||||
@Nullable private final TrackEncryptionBox[] sampleDescriptionEncryptionBoxes;
|
@Nullable private final TrackEncryptionBox[] sampleDescriptionEncryptionBoxes;
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
public Track(int id, int type, long timescale, long movieTimescale, long durationUs,
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
Format format, @Transformation int sampleTransformation,
|
||||||
public Track(
|
@Nullable TrackEncryptionBox[] sampleDescriptionEncryptionBoxes, int nalUnitLengthFieldLength,
|
||||||
int id,
|
@Nullable long[] editListDurations, @Nullable long[] editListMediaTimes) {
|
||||||
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,10 +52,7 @@ 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.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable public final byte[] defaultInitializationVector;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
public final byte[] defaultInitializationVector;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param isEncrypted See {@link #isEncrypted}.
|
* @param isEncrypted See {@link #isEncrypted}.
|
||||||
@ -66,8 +63,6 @@ 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