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 {
|
try {
|
||||||
videoFrameProcessingTaskExecutor.flush();
|
videoFrameProcessingTaskExecutor.flush();
|
||||||
|
|
||||||
|
// Flush from the end of the GlShaderProgram pipeline up to the start.
|
||||||
CountDownLatch latch = new CountDownLatch(1);
|
CountDownLatch latch = new CountDownLatch(1);
|
||||||
inputSwitcher.activeTextureManager().setOnFlushCompleteListener(latch::countDown);
|
inputSwitcher.activeTextureManager().setOnFlushCompleteListener(latch::countDown);
|
||||||
videoFrameProcessingTaskExecutor.submit(finalShaderProgramWrapper::flush);
|
videoFrameProcessingTaskExecutor.submit(finalShaderProgramWrapper::flush);
|
||||||
latch.await();
|
latch.await();
|
||||||
|
|
||||||
inputSwitcher.activeTextureManager().setOnFlushCompleteListener(null);
|
inputSwitcher.activeTextureManager().setOnFlushCompleteListener(null);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
|
@ -78,6 +78,8 @@ public interface GlShaderProgram {
|
|||||||
*
|
*
|
||||||
* <p>The implementation shall not assume the {@link GlShaderProgram} is {@linkplain
|
* <p>The implementation shall not assume the {@link GlShaderProgram} is {@linkplain
|
||||||
* #onReadyToAcceptInputFrame ready to accept another input frame} when this method is called.
|
* #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() {}
|
default void onFlush() {}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user