Contents

stepByPresentationTime(_:completionHandler:)

Moves the cursor on the presentation timeline by the delta presentation time that you specify.

Declaration

func stepByPresentationTime(_ deltaPresentationTime: CMTime, completionHandler: @escaping  @Sendable (CMTime, Bool, (any Error)?) -> Void)
func stepByPresentationTime(_ deltaPresentationTime: CMTime) async throws -> (CMTime, Bool)

Parameters

  • deltaPresentationTime:

    The presentation time to move the sample cursor to.

  • completionHandler:

    The completion block to execute when the move operation finishes.

Discussion

The value for actualDecodeTime is the final cursor presentation time. Because sample cursors snap to sample boundaries when stepped, this value may not be equal to the current sample decode time + deltaPresentationTime, even if the cursor isn’t pinned.

If the request would advance the cursor past the end of the last sample or before the first sample, this method sets the cursor to point to that limiting sample, and sets positionWasPinned to true. Otherwise, it sets positionWasPinned to false.

See Also

Stepping through samples