Instance Method

makeSampleCursor(presentationTimeStamp:)

Creates an instance of a sample cursor and positions it at or near the specified presentation timestamp.

Declaration

func makeSampleCursor(presentationTimeStamp: CMTime) -> AVSampleCursor?

Parameters

presentationTimeStamp

The desired initial presentation timestamp of the AVSampleCursor.

Return Value

An instance of AVSampleCursor.

Discussion

If the receiver's asset property value for providesPreciseDurationAndTiming is true, the sample cursor is accurately positioned at the receiver's last media sample with a presentation timestamp less than or equal to the desired timestamp, or, if there are no such samples, the first sample in presentation order.

If the receiver's asset property value for providesPreciseDurationAndTiming is false, and it is prohibitively expensive to locate the precise sample at the desired timestamp, the sample cursor may be approximately positioned.

See Also

Creating Sample Cursors

var canProvideSampleCursors: Bool

A Boolean value that indicates whether the asset track can provide instances of sample cursors to traverse its media samples and discover information.

func makeSampleCursorAtFirstSampleInDecodeOrder() -> AVSampleCursor?

Creates an instance of a sample cursor and positions it at the receiver's first media sample in decode order.

func makeSampleCursorAtLastSampleInDecodeOrder() -> AVSampleCursor?

Creates an instance of a sample cursor and positions it at the receiver's last media sample in decode order.