Skip to content

Commit

Permalink
Fix ChainingGlTextureProcessorListener field name.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 466735554
  • Loading branch information
Googler authored and marcbaechinger committed Oct 19, 2022
1 parent 70972bb commit 43aa89a
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -41,7 +41,7 @@
private final Queue<Pair<TextureInfo, Long>> availableFrames;

@GuardedBy("this")
private int nextGlTextureProcessorInputCapacity;
private int consumingGlTextureProcessorInputCapacity;

/**
* Creates a new instance.
Expand Down Expand Up @@ -69,7 +69,7 @@ public ChainingGlTextureProcessorListener(
public synchronized void onReadyToAcceptInputFrame() {
@Nullable Pair<TextureInfo, Long> pendingFrame = availableFrames.poll();
if (pendingFrame == null) {
nextGlTextureProcessorInputCapacity++;
consumingGlTextureProcessorInputCapacity++;
return;
}

Expand All @@ -94,12 +94,12 @@ public void onInputFrameProcessed(TextureInfo inputTexture) {
@Override
public synchronized void onOutputFrameAvailable(
TextureInfo outputTexture, long presentationTimeUs) {
if (nextGlTextureProcessorInputCapacity > 0) {
if (consumingGlTextureProcessorInputCapacity > 0) {
frameProcessingTaskExecutor.submit(
() ->
consumingGlTextureProcessor.queueInputFrame(
/* inputTexture= */ outputTexture, presentationTimeUs));
nextGlTextureProcessorInputCapacity--;
consumingGlTextureProcessorInputCapacity--;
} else {
availableFrames.add(new Pair<>(outputTexture, presentationTimeUs));
}
Expand Down

0 comments on commit 43aa89a

Please sign in to comment.