Contents

respondToEachPassDescription(on:using:)

Tells the input to invoke a callback whenever it begins a new pass.

Declaration

func respondToEachPassDescription(on queue: dispatch_queue_t, using block: @escaping  @Sendable () -> Void)

Parameters

  • queue:

    The queue on which to invoke the callback.

  • block:

    A callback the input invokes at the beginning of each pass.

Discussion

A typical implemementation of the callback block performs the following steps:

  1. Gets the value of the currentPassDescription property and configures media data source accordingly.

  2. Calls the requestMediaDataWhenReady(on:using:) method to begin appending data for the current pass.

After you’ve appended all media data for the current pass, call the markCurrentPassAsFinished() method have the system determine whether to perform another pass. If it performs an additional pass the system invokes the callback to begin the next pass. When it determines that it requires no additional passes, the system invokes the callback one final time so the client can invoke markAsFinished() in response to the value of currentPassDescription becoming nil.

See Also

Performing multiple-pass encoding