How do you track when a VNVideoProcessor analysis is finished?

I'm adopting and transitioning to VNVideoProcessor away from performing Vision requests on individual frames, since it more concisely does the same. However, I'm not sure how to detect when analysis of a video is finished. Previously when reading frames with AVFoundation I could check with

            // Get the next sample from the asset reader output.
            guard let sampleBuffer = readerOutput.copyNextSampleBuffer() else {
                // The asset reader output has no more samples to vend.
                isDone = true
                break
            }

What would be an equivalent when using VNVideoProcessor?

Replies

Oh I see, analyze(_:) returns when the video is finished processing.