mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
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:
parent
eb58d20067
commit
9baa6f6be5
@ -345,11 +345,11 @@ public final class DefaultVideoFrameProcessorVideoFrameRenderingTest {
|
||||
.submit(
|
||||
() -> {
|
||||
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
|
||||
// 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();
|
||||
blankFrameProducer.produceBlankFramesAndQueueEndOfStream(inputPresentationTimesUs);
|
||||
defaultVideoFrameProcessor.signalEndOfInput();
|
||||
|
Loading…
x
Reference in New Issue
Block a user