Commit eea6fc0c by hschlueter Committed by Ian Baker

Fix FrameProcessorChain method ordering.

signalEndOfInputStream makes more sense before isEnded and
getPendingInputFrameCount is related to registerInputFrame.

PiperOrigin-RevId: 441134418
parent e4d7e5e7
...@@ -324,6 +324,14 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; ...@@ -324,6 +324,14 @@ 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();
}
/**
* Checks whether any exceptions occurred during asynchronous frame processing and rethrows the * Checks whether any exceptions occurred during asynchronous frame processing and rethrows the
* first exception encountered. * first exception encountered.
*/ */
...@@ -345,12 +353,9 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; ...@@ -345,12 +353,9 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
} }
} }
/** /** Informs the {@code FrameProcessorChain} that no further input frames should be accepted. */
* Returns the number of input frames that have been {@linkplain #registerInputFrame() registered} public void signalEndOfInputStream() {
* but not completely processed yet. inputStreamEnded = true;
*/
public int getPendingFrameCount() {
return pendingFrameCount.get();
} }
/** Returns whether all frames have been processed. */ /** Returns whether all frames have been processed. */
...@@ -358,11 +363,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; ...@@ -358,11 +363,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
return inputStreamEnded && getPendingFrameCount() == 0; return inputStreamEnded && getPendingFrameCount() == 0;
} }
/** Informs the {@code FrameProcessorChain} that no further input frames should be accepted. */
public void signalEndOfInputStream() {
inputStreamEnded = true;
}
/** /**
* Releases all resources. * Releases all resources.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment