generateSampleCursor(atPresentationTimeStamp:completionHandler:)
Provides a new sample cursor that points to the sample at or near the specified presentation timestamp.
Declaration
func generateSampleCursor(atPresentationTimeStamp presentationTimeStamp: CMTime, completionHandler: @escaping @Sendable ((any MESampleCursor)?, (any Error)?) -> Void)func sampleCursor(atPresentationTimeStamp presentationTimeStamp: CMTime) async throws -> any MESampleCursorParameters
- presentationTimeStamp:
The presentation time stamp.
- completionHandler:
The completion block to execute when the generate operation finishes.
Discussion
The new sample cursor points to the last sample with a presentation time stamp (PTS) less than or equal to presentationTimeStamp, or if there are no such samples, the first sample in PTS order.
See Also
Getting track information
loadTrackInfo(completionHandler:)generateSampleCursorAtFirstSampleInDecodeOrder(completionHandler:)generateSampleCursorAtLastSampleInDecodeOrder(completionHandler:)loadUneditedDuration(completionHandler:)loadTotalSampleDataLength(completionHandler:)loadEstimatedDataRate(completionHandler:)loadMetadata(completionHandler:)