diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/AdvancedFrameProcessor.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/AdvancedFrameProcessor.java index 80f7a08ab62..b11a48f060b 100644 --- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/AdvancedFrameProcessor.java +++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/AdvancedFrameProcessor.java @@ -27,10 +27,11 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; /** - * Applies a transformation matrix in the vertex shader. Operations are done on normalized device - * coordinates (-1 to 1 on x and y axes). No automatic adjustments (like done in {@link - * ScaleToFitFrameProcessor}) are applied on the transformation. Width and height are not modified. - * The background color will default to black. + * Applies a transformation matrix in the vertex shader. + * + *
Operations are done on normalized device coordinates (-1 to 1 on x and y axes). No automatic + * adjustments (like done in {@link ScaleToFitFrameProcessor}) are applied on the transformation. + * Width and height are not modified. The background color will default to black. */ public final class AdvancedFrameProcessor implements GlFrameProcessor { diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Codec.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Codec.java index 72c86653ce6..4c6545c50b0 100644 --- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Codec.java +++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Codec.java @@ -34,7 +34,7 @@ */ public interface Codec { - /** A factory for {@link Codec decoder} instances. */ + /** A factory for {@linkplain Codec decoder} instances. */ interface DecoderFactory { /** A default {@code DecoderFactory} implementation. */ @@ -65,7 +65,7 @@ Codec createForVideoDecoding( throws TransformationException; } - /** A factory for {@link Codec encoder} instances. */ + /** A factory for {@linkplain Codec encoder} instances. */ interface EncoderFactory { /** A default {@code EncoderFactory} implementation. */ @@ -75,13 +75,13 @@ interface EncoderFactory { * Returns a {@link Codec} for audio encoding. * *
This method must validate that the {@link Codec} is configured to produce one of the
- * {@code allowedMimeTypes}. The {@link Format#sampleMimeType sample MIME type} given in {@code
- * format} is not necessarily allowed.
+ * {@code allowedMimeTypes}. The {@linkplain Format#sampleMimeType sample MIME type} given in
+ * {@code format} is not necessarily allowed.
*
* @param format The {@link Format} (of the output data) used to determine the underlying
* encoder and its configuration values.
- * @param allowedMimeTypes The non-empty list of allowed output sample {@link MimeTypes MIME
- * types}.
+ * @param allowedMimeTypes The non-empty list of allowed output sample {@linkplain MimeTypes
+ * MIME types}.
* @return A {@link Codec} for audio encoding.
* @throws TransformationException If no suitable {@link Codec} can be created.
*/
@@ -92,8 +92,8 @@ Codec createForAudioEncoding(Format format, List This method must validate that the {@link Codec} is configured to produce one of the
- * {@code allowedMimeTypes}. The {@link Format#sampleMimeType sample MIME type} given in {@code
- * format} is not necessarily allowed.
+ * {@code allowedMimeTypes}. The {@linkplain Format#sampleMimeType sample MIME type} given in
+ * {@code format} is not necessarily allowed.
*
* @param format The {@link Format} (of the output data) used to determine the underlying
* encoder and its configuration values. {@link Format#sampleMimeType}, {@link Format#width}
@@ -101,8 +101,8 @@ Codec createForAudioEncoding(Format format, List This method must not be called from video encoders because they must use {@link Surface
- * surfaces} as inputs.
+ * This method must not be called from video encoders because they must use a {@link Surface}
+ * to receive input.
*
* @param inputBuffer The buffer where the dequeued buffer data is stored, at {@link
* DecoderInputBuffer#data inputBuffer.data}.
@@ -151,13 +151,13 @@ default boolean videoNeedsEncoding() {
boolean maybeDequeueInputBuffer(DecoderInputBuffer inputBuffer) throws TransformationException;
/**
- * Queues an input buffer to the {@code Codec}. No buffers may be queued after {@link
+ * Queues an input buffer to the {@code Codec}. No buffers may be queued after {@linkplain
* DecoderInputBuffer#isEndOfStream() end of stream} buffer has been queued.
*
- * This method must not be called from video encoders because they must use {@link Surface
- * surfaces} as inputs.
+ * This method must not be called from video encoders because they must use a {@link Surface}
+ * to receive input.
*
- * @param inputBuffer The {@link DecoderInputBuffer input buffer}.
+ * @param inputBuffer The {@linkplain DecoderInputBuffer input buffer}.
* @throws TransformationException If the underlying decoder or encoder encounters a problem.
*/
void queueInputBuffer(DecoderInputBuffer inputBuffer) throws TransformationException;
@@ -167,7 +167,8 @@ default boolean videoNeedsEncoding() {
*
* This method must only be called on video encoders because they must use a {@link Surface} as
* input. For audio/video decoders or audio encoders, the {@link C#BUFFER_FLAG_END_OF_STREAM} flag
- * should be set on the last input buffer {@link #queueInputBuffer(DecoderInputBuffer) queued}.
+ * should be set on the last input buffer {@linkplain #queueInputBuffer(DecoderInputBuffer)
+ * queued}.
*
* @throws TransformationException If the underlying video encoder encounters a problem.
*/
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultEncoderFactory.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultEncoderFactory.java
index 5c64da6409a..e284f023a69 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultEncoderFactory.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultEncoderFactory.java
@@ -197,9 +197,9 @@ public boolean videoNeedsEncoding() {
}
/**
- * Finds an {@link MediaCodecInfo encoder} that supports the requested format most closely.
+ * Finds an {@linkplain MediaCodecInfo encoder} that supports the requested format most closely.
*
- * Returns the {@link MediaCodecInfo encoder} and the supported {@link Format} in a {@link
+ * Returns the {@linkplain MediaCodecInfo encoder} and the supported {@link Format} in a {@link
* Pair}, or {@code null} if none is found.
*/
@RequiresNonNull("#1.sampleMimeType")
@@ -400,22 +400,22 @@ private static void adjustMediaFormatForH264EncoderSettings(
private interface EncoderFallbackCost {
/**
* Returns a cost that represents the gap between the requested encoding parameter(s) and the
- * {@link MediaCodecInfo encoder}'s support for them.
+ * {@linkplain MediaCodecInfo encoder}'s support for them.
*
- * The method must return {@link Integer#MAX_VALUE} when the {@link MediaCodecInfo encoder}
- * does not support the encoding parameters.
+ * The method must return {@link Integer#MAX_VALUE} when the {@linkplain MediaCodecInfo
+ * encoder} does not support the encoding parameters.
*/
int getParameterSupportGap(MediaCodecInfo encoderInfo);
}
/**
- * Filters a list of {@link MediaCodecInfo encoders} by a {@link EncoderFallbackCost cost
- * function}.
+ * Filters a list of {@linkplain MediaCodecInfo encoders} by a {@linkplain EncoderFallbackCost
+ * cost function}.
*
- * @param encoders A list of {@link MediaCodecInfo encoders}.
- * @param cost A {@link EncoderFallbackCost cost function}.
- * @return A list of {@link MediaCodecInfo encoders} with the lowest costs, empty if the costs of
- * all encoders are {@link Integer#MAX_VALUE}.
+ * @param encoders A list of {@linkplain MediaCodecInfo encoders}.
+ * @param cost A {@linkplain EncoderFallbackCost cost function}.
+ * @return A list of {@linkplain MediaCodecInfo encoders} with the lowest costs, empty if the
+ * costs of all encoders are {@link Integer#MAX_VALUE}.
*/
private static ImmutableList The input resolution is returned, if it (after aligning to the encoders requirement) is
- * supported by the {@link MediaCodecInfo encoder}.
+ * The input resolution is returned, if it (after aligning to the encoder's requirement) is
+ * supported by the {@linkplain MediaCodecInfo encoder}.
*
- * The resolution will be adjusted to be within the {@link MediaCodecInfo encoder}'s range of
- * supported resolutions, and will be aligned to the {@link MediaCodecInfo encoder}'s alignment
- * requirement. The adjustment process takes into account the original aspect ratio. But the fixed
- * resolution may not preserve the original aspect ratio, depending on the encoder's required size
- * alignment.
+ * The resolution will be adjusted to be within the {@linkplain MediaCodecInfo encoder}'s range
+ * of supported resolutions, and will be aligned to the {@linkplain MediaCodecInfo encoder}'s
+ * alignment requirement. The adjustment process takes into account the original aspect ratio. But
+ * the fixed resolution may not preserve the original aspect ratio, depending on the encoder's
+ * required size alignment.
*
* @param encoderInfo The {@link MediaCodecInfo} of the encoder.
* @param mimeType The output MIME type.
* @param width The original width.
* @param height The original height.
- * @return A {@link Size supported resolution}, or {@code null} if unable to find a fallback.
+ * @return A {@linkplain Size supported resolution}, or {@code null} if unable to find a fallback.
*/
@Nullable
public static Size getSupportedResolution(
@@ -134,7 +134,7 @@ public static Size getSupportedResolution(
* Finds the highest supported encoding level given a profile.
*
* @param encoderInfo The {@link MediaCodecInfo encoderInfo}.
- * @param mimeType The {@link MimeTypes MIME type}.
+ * @param mimeType The {@linkplain MimeTypes MIME type}.
* @param profile The encoding profile.
* @return The highest supported encoding level, as documented in {@link
* MediaCodecInfo.CodecProfileLevel}, or {@link #LEVEL_UNSET} if the profile is not supported.
@@ -155,8 +155,8 @@ public static int findHighestSupportedEncodingLevel(
}
/**
- * Finds a {@link MediaCodec codec} that supports the {@link MediaFormat}, or {@code null} if none
- * is found.
+ * Finds a {@link MediaCodec} that supports the {@link MediaFormat}, or {@code null} if none is
+ * found.
*/
@Nullable
public static String findCodecForFormat(MediaFormat format, boolean isDecoder) {
@@ -181,7 +181,8 @@ public static String findCodecForFormat(MediaFormat format, boolean isDecoder) {
}
/**
- * Finds the {@link MediaCodecInfo encoder}'s closest supported bitrate from the given bitrate.
+ * Finds the {@linkplain MediaCodecInfo encoder}'s closest supported bitrate from the given
+ * bitrate.
*/
public static int getClosestSupportedBitrate(
MediaCodecInfo encoderInfo, String mimeType, int bitrate) {
@@ -201,7 +202,7 @@ public static boolean isBitrateModeSupported(
.isBitrateModeSupported(bitrateMode);
}
- /** Checks if a {@link MediaCodecInfo codec} is hardware-accelerated. */
+ /** Checks if a {@linkplain MediaCodecInfo codec} is hardware-accelerated. */
public static boolean isHardwareAccelerated(MediaCodecInfo encoderInfo, String mimeType) {
// TODO(b/214964116): Merge into MediaCodecUtil.
if (Util.SDK_INT >= 29) {
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExternalCopyFrameProcessor.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExternalCopyFrameProcessor.java
index 47688ef70e8..d90e9f802f6 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExternalCopyFrameProcessor.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExternalCopyFrameProcessor.java
@@ -92,7 +92,7 @@ public void initialize(int inputTexId) throws IOException {
* Sets the texture transform matrix for converting an external surface texture's coordinates to
* sampling locations.
*
- * @param textureTransformMatrix The external surface texture's {@link
+ * @param textureTransformMatrix The external surface texture's {@linkplain
* android.graphics.SurfaceTexture#getTransformMatrix(float[]) transform matrix}.
*/
public void setTextureTransformMatrix(float[] textureTransformMatrix) {
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FallbackListener.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FallbackListener.java
index d335f0f63fa..d587a7fee1f 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FallbackListener.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FallbackListener.java
@@ -40,7 +40,8 @@
* Creates a new instance.
*
* @param mediaItem The {@link MediaItem} to transform.
- * @param transformerListeners The {@link Transformer.Listener listeners} to forward events to.
+ * @param transformerListeners The {@linkplain Transformer.Listener listeners} to forward events
+ * to.
* @param originalTransformationRequest The original {@link TransformationRequest}.
*/
public FallbackListener(
@@ -56,7 +57,7 @@ public FallbackListener(
/**
* Registers an output track.
*
- * All tracks must be registered before a transformation request is {@link
+ * All tracks must be registered before a transformation request is {@linkplain
* #onTransformationRequestFinalized(TransformationRequest) finalized}.
*/
public void registerTrack() {
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameProcessorChain.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameProcessorChain.java
index cc10131c7c8..5279a461ebf 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameProcessorChain.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameProcessorChain.java
@@ -52,12 +52,12 @@
/**
* {@code FrameProcessorChain} applies changes to individual video frames.
*
- * Input becomes available on its {@link #getInputSurface() input surface} asynchronously and is
- * processed on a background thread as it becomes available. All input frames should be {@link
- * #registerInputFrame() registered} before they are rendered to the input surface. {@link
- * #getPendingFrameCount()} can be used to check whether there are frames that have not been fully
- * processed yet. Output is written to its {@link #configure(Surface, int, int, SurfaceView) output
- * surface}.
+ * Input becomes available on its {@linkplain #getInputSurface() input surface} asynchronously
+ * and is processed on a background thread as it becomes available. All input frames should be
+ * {@linkplain #registerInputFrame() registered} before they are rendered to the input surface.
+ * {@link #getPendingFrameCount()} can be used to check whether there are frames that have not been
+ * fully processed yet. Output is written to its {@linkplain #configure(Surface, int, int,
+ * SurfaceView) output surface}.
*/
/* package */ final class FrameProcessorChain {
@@ -74,7 +74,7 @@
private final ExecutorService singleThreadExecutorService;
/** Futures corresponding to the executor service's pending tasks. */
private final ConcurrentLinkedQueue This method may only be called once and may override the {@link
+ * This method may only be called once and may override the {@linkplain
* GlFrameProcessor#configureOutputSize(int, int) output size} of the final {@link
* GlFrameProcessor}.
*
@@ -253,8 +253,8 @@ public void configure(
/**
* Returns the input {@link Surface}.
*
- * The {@code FrameProcessorChain} must be {@link #configure(Surface, int, int, SurfaceView)
- * configured}.
+ * The {@code FrameProcessorChain} must be {@linkplain #configure(Surface, int, int,
+ * SurfaceView) configured}.
*/
public Surface getInputSurface() {
checkStateNotNull(inputSurface, "The FrameProcessorChain must be configured.");
@@ -296,8 +296,8 @@ public void getAndRethrowBackgroundExceptions() throws TransformationException {
}
/**
- * Returns the number of input frames that have been {@link #registerInputFrame() registered} but
- * not completely processed yet.
+ * Returns the number of input frames that have been {@linkplain #registerInputFrame() registered}
+ * but not completely processed yet.
*/
public int getPendingFrameCount() {
return pendingFrameCount.get();
@@ -316,9 +316,9 @@ public void signalEndOfInputStream() {
/**
* Releases all resources.
*
- * If the frame processor chain is released before it has {@link #isEnded() ended}, it will
- * attempt to cancel processing any input frames that have already become available. Input frames
- * that become available after release are ignored.
+ * If the frame processor chain is released before it has {@linkplain #isEnded() ended}, it
+ * will attempt to cancel processing any input frames that have already become available. Input
+ * frames that become available after release are ignored.
*/
public void release() {
releaseRequested = true;
@@ -447,7 +447,7 @@ private void processFrame() {
}
/**
- * Configures the input and output {@link Size sizes} of a list of {@link GlFrameProcessor
+ * Configures the input and output {@linkplain Size sizes} of a list of {@link GlFrameProcessor
* GlFrameProcessors}.
*
* @param inputWidth The width of frames passed to the first {@link GlFrameProcessor}, in pixels.
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameworkMuxer.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameworkMuxer.java
index db4bbec1486..e92c42281e2 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameworkMuxer.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameworkMuxer.java
@@ -221,13 +221,13 @@ public void release(boolean forCancellation) throws MuxerException {
}
/**
- * Converts a {@link MimeTypes MIME type} into a {@link MediaMuxer.OutputFormat MediaMuxer output
- * format}.
+ * Converts a {@linkplain MimeTypes MIME type} into a {@linkplain MediaMuxer.OutputFormat
+ * MediaMuxer output format}.
*
- * @param mimeType The {@link MimeTypes MIME type} to convert.
- * @return The corresponding {@link MediaMuxer.OutputFormat MediaMuxer output format}.
- * @throws IllegalArgumentException If the {@link MimeTypes MIME type} is not supported as output
- * format.
+ * @param mimeType The {@linkplain MimeTypes MIME type} to convert.
+ * @return The corresponding {@linkplain MediaMuxer.OutputFormat MediaMuxer output format}.
+ * @throws IllegalArgumentException If the {@linkplain MimeTypes MIME type} is not supported as
+ * output format.
*/
private static int mimeTypeToMuxerOutputFormat(String mimeType) {
if (mimeType.equals(MimeTypes.VIDEO_MP4)) {
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/GlFrameProcessor.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/GlFrameProcessor.java
index 8bec9262512..d6f9b12e83e 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/GlFrameProcessor.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/GlFrameProcessor.java
@@ -55,8 +55,8 @@ public interface GlFrameProcessor {
/**
* Updates the shader program's vertex attributes and uniforms, binds them, and draws.
*
- * The frame processor must be {@link #initialize(int) initialized}. The caller is responsible
- * for focussing the correct render target before calling this method.
+ * The frame processor must be {@linkplain #initialize(int) initialized}. The caller is
+ * responsible for focussing the correct render target before calling this method.
*
* @param presentationTimeNs The presentation timestamp of the current frame, in nanoseconds.
*/
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Muxer.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Muxer.java
index aa83f2a4973..44ad95fe066 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Muxer.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Muxer.java
@@ -27,12 +27,12 @@
/**
* Abstracts media muxing operations.
*
- * Query whether {@link Factory#supportsOutputMimeType(String) container MIME type} and {@link
- * Factory#supportsSampleMimeType(String, String) sample MIME types} are supported and {@link
- * #addTrack(Format) add all tracks}, then {@link #writeSampleData(int, ByteBuffer, boolean, long)
- * write sample data} to mux samples. Once any sample data has been written, it is not possible to
- * add tracks. After writing all sample data, {@link #release(boolean) release} the instance to
- * finish writing to the output and return any resources to the system.
+ * Query whether {@linkplain Factory#supportsOutputMimeType(String) container MIME type} and
+ * {@linkplain Factory#supportsSampleMimeType(String, String) sample MIME types} are supported and
+ * {@linkplain #addTrack(Format) add all tracks}, then {@linkplain #writeSampleData(int, ByteBuffer,
+ * boolean, long) write sample data} to mux samples. Once any sample data has been written, it is
+ * not possible to add tracks. After writing all sample data, {@linkplain #release(boolean) release}
+ * the instance to finish writing to the output and return any resources to the system.
*/
/* package */ interface Muxer {
@@ -55,7 +55,7 @@ interface Factory {
* Returns a new muxer writing to a file.
*
* @param path The path to the output file.
- * @param outputMimeType The container {@link MimeTypes MIME type} of the output file.
+ * @param outputMimeType The container {@linkplain MimeTypes MIME type} of the output file.
* @throws IllegalArgumentException If the path is invalid or the MIME type is not supported.
* @throws IOException If an error occurs opening the output file for writing.
*/
@@ -68,7 +68,7 @@ interface Factory {
* output. The file referenced by this ParcelFileDescriptor should not be used before the
* muxer is released. It is the responsibility of the caller to close the
* ParcelFileDescriptor. This can be done after this method returns.
- * @param outputMimeType The {@link MimeTypes MIME type} of the output.
+ * @param outputMimeType The {@linkplain MimeTypes MIME type} of the output.
* @throws IllegalArgumentException If the file descriptor is invalid or the MIME type is not
* supported.
* @throws IOException If an error occurs opening the output file descriptor for writing.
@@ -76,18 +76,20 @@ interface Factory {
Muxer create(ParcelFileDescriptor parcelFileDescriptor, String outputMimeType)
throws IOException;
- /** Returns whether the {@link MimeTypes MIME type} provided is a supported output format. */
+ /**
+ * Returns whether the {@linkplain MimeTypes MIME type} provided is a supported output format.
+ */
boolean supportsOutputMimeType(String mimeType);
/**
- * Returns whether the sample {@link MimeTypes MIME type} is supported with the given container
- * {@link MimeTypes MIME type}.
+ * Returns whether the sample {@linkplain MimeTypes MIME type} is supported with the given
+ * container {@linkplain MimeTypes MIME type}.
*/
boolean supportsSampleMimeType(@Nullable String sampleMimeType, String containerMimeType);
/**
- * Returns the supported sample {@link MimeTypes MIME types} for the given {@link C.TrackType}
- * and container {@link MimeTypes MIME type}.
+ * Returns the supported sample {@linkplain MimeTypes MIME types} for the given {@link
+ * C.TrackType} and container {@linkplain MimeTypes MIME type}.
*/
ImmutableList All tracks must be registered before any track format is {@link #addTrackFormat(Format)
+ * All tracks must be registered before any track format is {@linkplain #addTrackFormat(Format)
* added}.
*
- * @throws IllegalStateException If a track format was {@link #addTrackFormat(Format) added}
+ * @throws IllegalStateException If a track format was {@linkplain #addTrackFormat(Format) added}
* before calling this method.
*/
public void registerTrack() {
@@ -82,14 +82,14 @@ public void registerTrack() {
trackCount++;
}
- /** Returns whether the sample {@link MimeTypes MIME type} is supported. */
+ /** Returns whether the sample {@linkplain MimeTypes MIME type} is supported. */
public boolean supportsSampleMimeType(@Nullable String mimeType) {
return muxerFactory.supportsSampleMimeType(mimeType, containerMimeType);
}
/**
- * Returns the supported {@link MimeTypes MIME types} for the given {@link C.TrackType track
- * type}.
+ * Returns the supported {@linkplain MimeTypes MIME types} for the given {@linkplain C.TrackType
+ * track type}.
*/
public ImmutableList The tracks must all be {@link #registerTrack() registered} before any format is added and
- * all the formats must be added before samples are {@link #writeSample(int, ByteBuffer, boolean,
- * long) written}.
+ * The tracks must all be {@linkplain #registerTrack() registered} before any format is added
+ * and all the formats must be added before samples are {@linkplain #writeSample(int, ByteBuffer,
+ * boolean, long) written}.
*
* @param format The {@link Format} to be added.
* @throws IllegalStateException If the format is unsupported or if there is already a track
@@ -133,16 +133,16 @@ public void addTrackFormat(Format format) throws Muxer.MuxerException {
/**
* Attempts to write a sample to the muxer.
*
- * @param trackType The {@link C.TrackType track type} of the sample.
+ * @param trackType The {@linkplain C.TrackType track type} of the sample.
* @param data The sample to write.
* @param isKeyFrame Whether the sample is a key frame.
* @param presentationTimeUs The presentation time of the sample in microseconds.
* @return Whether the sample was successfully written. This is {@code false} if the muxer hasn't
- * {@link #addTrackFormat(Format) received a format} for every {@link #registerTrack()
- * registered track}, or if it should write samples of other track types first to ensure a
- * good interleaving.
- * @throws IllegalStateException If the muxer doesn't have any {@link #endTrack(int) non-ended}
- * track of the given track type.
+ * {@linkplain #addTrackFormat(Format) received a format} for every {@linkplain
+ * #registerTrack() registered track}, or if it should write samples of other track types
+ * first to ensure a good interleaving.
+ * @throws IllegalStateException If the muxer doesn't have any {@linkplain #endTrack(int)
+ * non-ended} track of the given track type.
* @throws Muxer.MuxerException If the underlying muxer fails to write the sample.
*/
public boolean writeSample(
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/SefSlowMotionFlattener.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/SefSlowMotionFlattener.java
index 3fffad61058..3f9089b8cb2 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/SefSlowMotionFlattener.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/SefSlowMotionFlattener.java
@@ -247,8 +247,8 @@ private boolean shouldKeepFrameForOutputValidity(int layer, long timeUs) {
* output frame rate might be variable.
*
* This method can only be called if all the frames until the current one (included) have been
- * {@link #processCurrentFrame(int, long) processed} in order, and if the next frames have not
- * been processed yet.
+ * {@linkplain #processCurrentFrame(int, long) processed} in order, and if the next frames have
+ * not been processed yet.
*/
@VisibleForTesting
/* package */ long getCurrentFrameOutputTimeUs(long inputTimeUs) {
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationException.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationException.java
index 53f32c8f15f..3dd5b7e9882 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationException.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationException.java
@@ -145,7 +145,7 @@ public final class TransformationException extends Exception {
/**
* Caused by the output format for a track not being supported.
*
- * Supported output formats are limited by the muxer's capabilities and the {@link
+ * Supported output formats are limited by the muxer's capabilities and the {@linkplain
* Codec.DecoderFactory encoders} available.
*/
public static final int ERROR_CODE_OUTPUT_FORMAT_UNSUPPORTED = 4003;
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationRequest.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationRequest.java
index faf8d3436b6..ed72f97cb4d 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationRequest.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationRequest.java
@@ -159,7 +159,7 @@ public Builder setResolution(int outputHeight) {
* @param videoMimeType The MIME type of the video samples in the output.
* @return This builder.
* @throws IllegalArgumentException If the {@code videoMimeType} is non-null but not a video
- * {@link MimeTypes MIME type}.
+ * {@linkplain MimeTypes MIME type}.
*/
public Builder setVideoMimeType(@Nullable String videoMimeType) {
checkArgument(
@@ -184,7 +184,7 @@ public Builder setVideoMimeType(@Nullable String videoMimeType) {
* @param audioMimeType The MIME type of the audio samples in the output.
* @return This builder.
* @throws IllegalArgumentException If the {@code audioMimeType} is non-null but not an audio
- * {@link MimeTypes MIME type}.
+ * {@linkplain MimeTypes MIME type}.
*/
public Builder setAudioMimeType(@Nullable String audioMimeType) {
checkArgument(
@@ -216,7 +216,7 @@ public Builder setEnableRequestSdrToneMapping(boolean enableRequestSdrToneMappin
*
* This method is experimental, and will be renamed or removed in a future release. The HDR
* editing feature is under development and is intended for developing/testing HDR processing
- * and encoding support. HDR editing can't be enabled at the same time as {@link
+ * and encoding support. HDR editing can't be enabled at the same time as {@linkplain
* #setEnableRequestSdrToneMapping(boolean) SDR tone-mapping}.
*
* @param enableHdrEditing Whether to attempt to process any input video stream as a high
@@ -276,15 +276,15 @@ public TransformationRequest build() {
*/
public final int outputHeight;
/**
- * The requested output audio sample {@link MimeTypes MIME type}, or {@code null} if inferred from
- * the input.
+ * The requested output audio sample {@linkplain MimeTypes MIME type}, or {@code null} if inferred
+ * from the input.
*
* @see Builder#setAudioMimeType(String)
*/
@Nullable public final String audioMimeType;
/**
- * The requested output video sample {@link MimeTypes MIME type}, or {@code null} if inferred from
- * the input.
+ * The requested output video sample {@linkplain MimeTypes MIME type}, or {@code null} if inferred
+ * from the input.
*
* @see Builder#setVideoMimeType(String)
*/
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Transformer.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Transformer.java
index 532b7dcc76c..38db172318b 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Transformer.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Transformer.java
@@ -206,7 +206,7 @@ public Builder setFrameProcessors(List The default value is a {@link DefaultMediaSourceFactory} built with the context provided
- * in {@link #Builder(Context) the constructor}.
+ * in {@linkplain #Builder(Context) the constructor}.
*
* @param mediaSourceFactory A {@link MediaSource.Factory}.
* @return This builder.
@@ -307,7 +307,7 @@ public Builder removeListener(Transformer.Listener listener) {
}
/**
- * Removes all {@link Transformer.Listener listeners}.
+ * Removes all {@linkplain Transformer.Listener listeners}.
*
* This is equivalent to {@link Transformer#removeAllListeners()}.
*
@@ -637,7 +637,7 @@ public void removeListener(Transformer.Listener listener) {
}
/**
- * Removes all {@link Transformer.Listener listeners}.
+ * Removes all {@linkplain Transformer.Listener listeners}.
*
* @throws IllegalStateException If this method is called from the wrong thread.
*/
@@ -649,14 +649,14 @@ public void removeAllListeners() {
/**
* Starts an asynchronous operation to transform the given {@link MediaItem}.
*
- * The transformation state is notified through the {@link Builder#addListener(Listener)
+ * The transformation state is notified through the {@linkplain Builder#addListener(Listener)
* listener}.
*
* Concurrent transformations on the same Transformer object are not allowed.
*
* The output is an MP4 file. It can contain at most one video track and one audio track. Other
- * track types are ignored. For adaptive bitrate {@link MediaSource media sources}, the highest
- * bitrate video and audio streams are selected.
+ * track types are ignored. For adaptive bitrate {@linkplain MediaSource media sources}, the
+ * highest bitrate video and audio streams are selected.
*
* @param mediaItem The {@link MediaItem} to transform.
* @param path The path to the output file.
@@ -672,14 +672,14 @@ public void startTransformation(MediaItem mediaItem, String path) throws IOExcep
/**
* Starts an asynchronous operation to transform the given {@link MediaItem}.
*
- * The transformation state is notified through the {@link Builder#addListener(Listener)
+ * The transformation state is notified through the {@linkplain Builder#addListener(Listener)
* listener}.
*
* Concurrent transformations on the same Transformer object are not allowed.
*
* The output is an MP4 file. It can contain at most one video track and one audio track. Other
- * track types are ignored. For adaptive bitrate {@link MediaSource media sources}, the highest
- * bitrate video and audio streams are selected.
+ * track types are ignored. For adaptive bitrate {@linkplain MediaSource media sources}, the
+ * highest bitrate video and audio streams are selected.
*
* @param mediaItem The {@link MediaItem} to transform.
* @param parcelFileDescriptor A readable and writable {@link ParcelFileDescriptor} of the output.
@@ -765,7 +765,7 @@ public Looper getApplicationLooper() {
* Returns the current {@link ProgressState} and updates {@code progressHolder} with the current
* progress if it is {@link #PROGRESS_STATE_AVAILABLE available}.
*
- * After a transformation {@link Listener#onTransformationCompleted(MediaItem,
+ * After a transformation {@linkplain Listener#onTransformationCompleted(MediaItem,
* TransformationResult) completes}, this method returns {@link
* #PROGRESS_STATE_NO_TRANSFORMATION}.
*
diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/VideoEncoderSettings.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/VideoEncoderSettings.java
index 38cab20323c..2fe4a523275 100644
--- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/VideoEncoderSettings.java
+++ b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/VideoEncoderSettings.java
@@ -179,7 +179,7 @@ public VideoEncoderSettings build() {
/** The encoding bitrate. */
public final int bitrate;
- /** One of {@link BitrateMode the allowed modes}. */
+ /** One of {@linkplain BitrateMode the allowed modes}. */
public final @BitrateMode int bitrateMode;
/** The encoding profile. */
public final int profile;