makeSampleCursor(presentationTimeStamp:)
Creates a sample cursor and positions it at or near the specified presentation timestamp.
Declaration
func makeSampleCursor(presentationTimeStamp: CMTime) -> AVSampleCursor?Parameters
- presentationTimeStamp:
The initial presentation timestamp of the sample cursor.
Return Value
An instance of AVSampleCursor.
Discussion
If the track’s asset property value for providesPreciseDurationAndTiming is true, the sample cursor is accurately positioned at the track’slast 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 track’s asset property value for providesPreciseDurationAndTiming is false, and it’s prohibitively expensive to locate the precise sample at the desired timestamp, the sample cursor may be approximately positioned.