flush(removingDisplayedImage:)
Instructs the receiver to discard pending enqueued sample buffers and call the provided block when complete. This method suspends until the flush is complete.
Declaration
nonisolated(nonsending) func flush(removingDisplayedImage removeDisplayedImage: Bool) asyncParameters
- removeDisplayedImage:
Set to true to remove any currently displayed image, false to preserve any current image.
Discussion
A flush resets decoder state. The next frame passed to enqueueSampleBuffer: should be an IDR frame (also known as a key frame or sync sample).