Contents

stepByDecodeTime(_:completionHandler:)

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

Declaration

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

Parameters

  • deltaDecodeTime:

    The decode 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 decode time. Because sample cursors snap to sample boundaries when stepped, this value may not be equal to the current sample decode time + deltaDecodeTime, 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