Contents

VTCompressionSessionGetTimeRangesForNextPass(_:timeRangeCountOut:timeRangeArrayOut:)

Retrieves the time ranges for the next pass.

Declaration

func VTCompressionSessionGetTimeRangesForNextPass(_ session: VTCompressionSession, timeRangeCountOut: UnsafeMutablePointer<CMItemCount>, timeRangeArrayOut: UnsafeMutablePointer<UnsafePointer<CMTimeRange>?>) -> OSStatus

Parameters

  • session:

    The compression session.

  • timeRangeCountOut:

    A pointer to the item count (Cmitemcount) to receive the number of CMTimeRanges.

  • timeRangeArrayOut:

    A pointer to a C array of CMTimeRanges. The storage for this array belongs to the compression session and should not be modified.The pointer is valid until the next call to Vtcompressionsessionendpass(_:furtherpassesrequestedout:_:), or until the compression session is invalidated or finalized.

Discussion

If VTCompressionSessionEndPass(_:furtherPassesRequestedOut:_:) sets furtherPassesRequestedOut to true, call this function to find out the time ranges for the next pass. Source frames outside these time ranges should be skipped. Each time range includes any frame at its start time and does not include any frame at its end time.

It’s an error to call this function when multipass encoding has not been enabled by setting kVTCompressionPropertyKey_MultiPassStorage, or when VTCompressionSessionEndPass did not set furtherPassesRequestedOut to true.

See Also

Performing Multiple Passes