mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
Fix FrameProcessorChain method ordering.
signalEndOfInputStream makes more sense before isEnded and getPendingInputFrameCount is related to registerInputFrame. PiperOrigin-RevId: 441134418
This commit is contained in:
parent
e4d7e5e7f5
commit
eea6fc0c13
1 changed files with 11 additions and 11 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue