mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Fix FrameProcessorChain method ordering.
signalEndOfInputStream makes more sense before isEnded and getPendingInputFrameCount is related to registerInputFrame. PiperOrigin-RevId: 441134418
This commit is contained in:
parent
0a16813f1c
commit
9b4aba33a3
@ -323,6 +323,14 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||||||
pendingFrameCount.incrementAndGet();
|
pendingFrameCount.incrementAndGet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of input frames that have been {@linkplain #registerInputFrame() registered}
|
||||||
|
* but not completely processed yet.
|
||||||
|
*/
|
||||||
|
public int getPendingFrameCount() {
|
||||||
|
return pendingFrameCount.get();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether any exceptions occurred during asynchronous frame processing and rethrows the
|
* Checks whether any exceptions occurred during asynchronous frame processing and rethrows the
|
||||||
* first exception encountered.
|
* first exception encountered.
|
||||||
@ -345,12 +353,9 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Informs the {@code FrameProcessorChain} that no further input frames should be accepted. */
|
||||||
* Returns the number of input frames that have been {@linkplain #registerInputFrame() registered}
|
public void signalEndOfInputStream() {
|
||||||
* but not completely processed yet.
|
inputStreamEnded = true;
|
||||||
*/
|
|
||||||
public int getPendingFrameCount() {
|
|
||||||
return pendingFrameCount.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns whether all frames have been processed. */
|
/** Returns whether all frames have been processed. */
|
||||||
@ -358,11 +363,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||||||
return inputStreamEnded && getPendingFrameCount() == 0;
|
return inputStreamEnded && getPendingFrameCount() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Informs the {@code FrameProcessorChain} that no further input frames should be accepted. */
|
|
||||||
public void signalEndOfInputStream() {
|
|
||||||
inputStreamEnded = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Releases all resources.
|
* Releases all resources.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user