Effect: Clarify flush behavior in javadoc
PiperOrigin-RevId: 576118064
This commit is contained in:
parent
1fc34676d9
commit
a8a590c305
@ -554,10 +554,13 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor {
|
||||
}
|
||||
try {
|
||||
videoFrameProcessingTaskExecutor.flush();
|
||||
|
||||
// Flush from the end of the GlShaderProgram pipeline up to the start.
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
inputSwitcher.activeTextureManager().setOnFlushCompleteListener(latch::countDown);
|
||||
videoFrameProcessingTaskExecutor.submit(finalShaderProgramWrapper::flush);
|
||||
latch.await();
|
||||
|
||||
inputSwitcher.activeTextureManager().setOnFlushCompleteListener(null);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
|
@ -78,6 +78,8 @@ public interface GlShaderProgram {
|
||||
*
|
||||
* <p>The implementation shall not assume the {@link GlShaderProgram} is {@linkplain
|
||||
* #onReadyToAcceptInputFrame ready to accept another input frame} when this method is called.
|
||||
* If the implementation manages a limited input capacity, it must clear all prior {@linkplain
|
||||
* #onReadyToAcceptInputFrame input frame capacity}.
|
||||
*/
|
||||
default void onFlush() {}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user