diff --git a/libraries/transformer/src/main/java/androidx/media3/transformer/FrameProcessorChain.java b/libraries/transformer/src/main/java/androidx/media3/transformer/FrameProcessorChain.java index 9a8b86a207..e3382bd631 100644 --- a/libraries/transformer/src/main/java/androidx/media3/transformer/FrameProcessorChain.java +++ b/libraries/transformer/src/main/java/androidx/media3/transformer/FrameProcessorChain.java @@ -323,6 +323,14 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; pendingFrameCount.incrementAndGet(); } + /** + * Returns the number of input frames that have been {@linkplain #registerInputFrame() registered} + * but not completely processed yet. + */ + public int getPendingFrameCount() { + return pendingFrameCount.get(); + } + /** * Checks whether any exceptions occurred during asynchronous frame processing and rethrows the * first exception encountered. @@ -345,12 +353,9 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; } } - /** - * Returns the number of input frames that have been {@linkplain #registerInputFrame() registered} - * but not completely processed yet. - */ - public int getPendingFrameCount() { - return pendingFrameCount.get(); + /** Informs the {@code FrameProcessorChain} that no further input frames should be accepted. */ + public void signalEndOfInputStream() { + inputStreamEnded = true; } /** Returns whether all frames have been processed. */ @@ -358,11 +363,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; return inputStreamEnded && getPendingFrameCount() == 0; } - /** Informs the {@code FrameProcessorChain} that no further input frames should be accepted. */ - public void signalEndOfInputStream() { - inputStreamEnded = true; - } - /** * Releases all resources. *