Import correct nullable annotation
PiperOrigin-RevId: 668521379
This commit is contained in:
parent
5c2dc7ed4e
commit
8367e420ad
@ -21,6 +21,7 @@ import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.opengl.Matrix;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.C;
|
||||
import androidx.media3.common.VideoFrameProcessingException;
|
||||
import androidx.media3.common.util.BitmapLoader;
|
||||
@ -31,7 +32,6 @@ import androidx.media3.datasource.DataSourceBitmapLoader;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* Creates {@link TextureOverlay}s from {@link Bitmap}s.
|
||||
@ -45,7 +45,7 @@ public abstract class BitmapOverlay extends TextureOverlay {
|
||||
|
||||
private int lastTextureId;
|
||||
private int lastBitmapGenerationId;
|
||||
private @Nullable Bitmap lastBitmap;
|
||||
@Nullable private Bitmap lastBitmap;
|
||||
|
||||
public BitmapOverlay() {
|
||||
float[] temp = GlUtil.create4x4IdentityMatrix();
|
||||
|
@ -24,6 +24,7 @@ import static androidx.media3.effect.DebugTraceUtil.EVENT_QUEUE_BITMAP;
|
||||
import static androidx.media3.effect.DebugTraceUtil.EVENT_SIGNAL_EOS;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.C;
|
||||
import androidx.media3.common.FrameInfo;
|
||||
import androidx.media3.common.GlObjectsProvider;
|
||||
@ -35,7 +36,6 @@ import androidx.media3.common.util.Util;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* Forwards a video frame produced from a {@link Bitmap} to a {@link GlShaderProgram} for
|
||||
|
@ -29,6 +29,7 @@ import static androidx.media3.common.util.Util.contains;
|
||||
import android.content.Context;
|
||||
import android.util.SparseArray;
|
||||
import android.view.Surface;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.ColorInfo;
|
||||
import androidx.media3.common.FrameInfo;
|
||||
import androidx.media3.common.GlObjectsProvider;
|
||||
@ -39,7 +40,6 @@ import androidx.media3.common.VideoFrameProcessor;
|
||||
import androidx.media3.effect.DefaultVideoFrameProcessor.WorkingColorSpace;
|
||||
import java.util.concurrent.Executor;
|
||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* A switcher to switch between {@linkplain TextureManager texture managers} of different
|
||||
@ -269,11 +269,13 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
checkNotNull(samplingGlShaderProgram).setOutputListener(gatedChainingListenerWrapper);
|
||||
}
|
||||
|
||||
public @Nullable ExternalShaderProgram getSamplingGlShaderProgram() {
|
||||
@Nullable
|
||||
public ExternalShaderProgram getSamplingGlShaderProgram() {
|
||||
return samplingGlShaderProgram;
|
||||
}
|
||||
|
||||
public @Nullable ColorInfo getInputColorInfo() {
|
||||
@Nullable
|
||||
public ColorInfo getInputColorInfo() {
|
||||
return inputColorInfo;
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ import static java.lang.annotation.ElementType.TYPE_USE;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.SystemClock;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.C;
|
||||
import androidx.media3.common.Format;
|
||||
import androidx.media3.common.PlaybackException;
|
||||
@ -48,7 +49,6 @@ import java.lang.annotation.Target;
|
||||
import java.util.ArrayDeque;
|
||||
import org.checkerframework.checker.nullness.qual.EnsuresNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
||||
|
||||
/** A {@link Renderer} implementation for images. */
|
||||
@ -108,14 +108,14 @@ public class ImageRenderer extends BaseRenderer {
|
||||
private long largestQueuedPresentationTimeUs;
|
||||
private @ReinitializationState int decoderReinitializationState;
|
||||
private @C.FirstFrameState int firstFrameState;
|
||||
private @Nullable Format inputFormat;
|
||||
private @Nullable ImageDecoder decoder;
|
||||
private @Nullable DecoderInputBuffer inputBuffer;
|
||||
@Nullable private Format inputFormat;
|
||||
@Nullable private ImageDecoder decoder;
|
||||
@Nullable private DecoderInputBuffer inputBuffer;
|
||||
private ImageOutput imageOutput;
|
||||
private @Nullable Bitmap outputBitmap;
|
||||
@Nullable private Bitmap outputBitmap;
|
||||
private boolean readyToOutputTiles;
|
||||
private @Nullable TileInfo tileInfo;
|
||||
private @Nullable TileInfo nextTileInfo;
|
||||
@Nullable private TileInfo tileInfo;
|
||||
@Nullable private TileInfo nextTileInfo;
|
||||
private int currentTileIndex;
|
||||
|
||||
/**
|
||||
@ -274,8 +274,8 @@ public class ImageRenderer extends BaseRenderer {
|
||||
throws ExoPlaybackException {
|
||||
switch (messageType) {
|
||||
case MSG_SET_IMAGE_OUTPUT:
|
||||
@Nullable ImageOutput imageOutput =
|
||||
message instanceof ImageOutput ? (ImageOutput) message : null;
|
||||
@Nullable
|
||||
ImageOutput imageOutput = message instanceof ImageOutput ? (ImageOutput) message : null;
|
||||
setImageOutput(imageOutput);
|
||||
break;
|
||||
default:
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
package androidx.media3.exoplayer.rtsp.reader;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.ParserException;
|
||||
import androidx.media3.common.util.ParsableByteArray;
|
||||
import androidx.media3.common.util.UnstableApi;
|
||||
import androidx.media3.exoplayer.rtsp.RtpPayloadFormat;
|
||||
import androidx.media3.extractor.ExtractorOutput;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/** Extracts media samples from the payload of received RTP packets. */
|
||||
@UnstableApi
|
||||
@ -37,7 +37,8 @@ public interface RtpPayloadReader {
|
||||
* @return A {@link RtpPayloadReader} for the packet stream, or {@code null} if the stream
|
||||
* format is not supported.
|
||||
*/
|
||||
@Nullable RtpPayloadReader createPayloadReader(RtpPayloadFormat payloadFormat);
|
||||
@Nullable
|
||||
RtpPayloadReader createPayloadReader(RtpPayloadFormat payloadFormat);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -40,6 +40,7 @@ import android.text.style.ForegroundColorSpan;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.text.style.TypefaceSpan;
|
||||
import android.util.Pair;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.C;
|
||||
import androidx.media3.common.ColorInfo;
|
||||
import androidx.media3.common.Effect;
|
||||
@ -74,7 +75,6 @@ import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
@ -645,7 +645,7 @@ public final class DefaultVideoCompositorPixelTest {
|
||||
private final LinkedHashMap<Long, Bitmap> outputTimestampsToBitmaps;
|
||||
private final List<VideoFrameProcessorTestRunner> inputVideoFrameProcessorTestRunners;
|
||||
private final VideoCompositor videoCompositor;
|
||||
private final @Nullable ExecutorService sharedExecutorService;
|
||||
@Nullable private final ExecutorService sharedExecutorService;
|
||||
private final AtomicReference<VideoFrameProcessingException> compositionException;
|
||||
private final CountDownLatch compositorEnded;
|
||||
private final String testId;
|
||||
|
@ -33,6 +33,7 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.C;
|
||||
import androidx.media3.common.Format;
|
||||
import androidx.media3.common.MediaItem;
|
||||
@ -51,7 +52,6 @@ import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.junit.AssumptionViolatedException;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
|
@ -16,6 +16,7 @@
|
||||
package androidx.media3.transformer;
|
||||
|
||||
import android.media.MediaCodec.BufferInfo;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.C;
|
||||
import androidx.media3.common.Format;
|
||||
import androidx.media3.common.Metadata;
|
||||
@ -33,7 +34,6 @@ import java.io.FileOutputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/** {@link Muxer} implementation that uses an {@link Mp4Muxer} or {@link FragmentedMp4Muxer}. */
|
||||
@UnstableApi
|
||||
@ -59,7 +59,7 @@ public final class InAppMuxer implements Muxer {
|
||||
|
||||
/** A builder for {@link Factory} instances. */
|
||||
public static final class Builder {
|
||||
private @Nullable MetadataProvider metadataProvider;
|
||||
@Nullable private MetadataProvider metadataProvider;
|
||||
private boolean outputFragmentedMp4;
|
||||
private long fragmentDurationMs;
|
||||
|
||||
@ -123,7 +123,7 @@ public final class InAppMuxer implements Muxer {
|
||||
MimeTypes.AUDIO_OPUS,
|
||||
MimeTypes.AUDIO_VORBIS);
|
||||
|
||||
private final @Nullable MetadataProvider metadataProvider;
|
||||
@Nullable private final MetadataProvider metadataProvider;
|
||||
private final boolean outputFragmentedMp4;
|
||||
private final long fragmentDurationMs;
|
||||
|
||||
@ -168,7 +168,7 @@ public final class InAppMuxer implements Muxer {
|
||||
}
|
||||
|
||||
private final androidx.media3.muxer.Muxer muxer;
|
||||
private final @Nullable MetadataProvider metadataProvider;
|
||||
@Nullable private final MetadataProvider metadataProvider;
|
||||
private final Set<Metadata.Entry> metadataEntries;
|
||||
|
||||
private InAppMuxer(
|
||||
|
@ -20,6 +20,7 @@ import static androidx.media3.common.util.Assertions.checkState;
|
||||
import static java.lang.Math.min;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.C;
|
||||
import androidx.media3.common.DataReader;
|
||||
import androidx.media3.common.Format;
|
||||
@ -40,7 +41,6 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* Provides some specific MP4 metadata about an mp4 file such as the duration, last sync sample
|
||||
@ -70,10 +70,10 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
public final boolean isFirstVideoSampleAfterTimeUsSyncSample;
|
||||
|
||||
/** The video {@link Format} or {@code null} if there is no video track. */
|
||||
public final @Nullable Format videoFormat;
|
||||
@Nullable public final Format videoFormat;
|
||||
|
||||
/** The audio {@link Format} or {@code null} if there is no audio track. */
|
||||
public final @Nullable Format audioFormat;
|
||||
@Nullable public final Format audioFormat;
|
||||
|
||||
private Mp4Info(
|
||||
long durationUs,
|
||||
|
Loading…
x
Reference in New Issue
Block a user