Fix operations order in RenderingTest

For DefaultVideoFrameProcessorVideoFrameRenderingTest: `registerInputStream` sets the textureManager, so reordering makes sure the textureManager is set before you set the frame info. This is important for texture input, where the frame info provides the width and height.

PiperOrigin-RevId: 529753404
This commit is contained in:
tofunmi 2023-05-05 17:31:17 +00:00 committed by Tofunmi Adigun-Hameed
parent eb58d20067
commit 9baa6f6be5

View File

@ -345,11 +345,11 @@ public final class DefaultVideoFrameProcessorVideoFrameRenderingTest {
.submit( .submit(
() -> { () -> {
blankFrameProducer.configureGlObjects(); blankFrameProducer.configureGlObjects();
checkNotNull(defaultVideoFrameProcessor)
.setInputFrameInfo(new FrameInfo.Builder(WIDTH, HEIGHT).build());
// A frame needs to be registered despite not queuing any external input to ensure // A frame needs to be registered despite not queuing any external input to ensure
// that the video frame processor knows about the stream offset. // that the video frame processor knows about the stream offset.
defaultVideoFrameProcessor.registerInputStream(INPUT_TYPE_SURFACE); checkNotNull(defaultVideoFrameProcessor).registerInputStream(INPUT_TYPE_SURFACE);
defaultVideoFrameProcessor.setInputFrameInfo(
new FrameInfo.Builder(WIDTH, HEIGHT).build());
defaultVideoFrameProcessor.registerInputFrame(); defaultVideoFrameProcessor.registerInputFrame();
blankFrameProducer.produceBlankFramesAndQueueEndOfStream(inputPresentationTimesUs); blankFrameProducer.produceBlankFramesAndQueueEndOfStream(inputPresentationTimesUs);
defaultVideoFrameProcessor.signalEndOfInput(); defaultVideoFrameProcessor.signalEndOfInput();