AVSampleCursor
An object that provides information about the media sample at the cursor’s current position.
Declaration
class AVSampleCursorOverview
You position a sample cursor at a specific media sample in a sequence of samples contained in a higher-level object, like an AVAssetTrack. You can move it to a new position in that sequence either backwards or forwards, either in decode order or in presentation order. You can also request moving it according to a count of samples or a delta in time.
Use a sample cursor to get information about the media sample such as its duration, timestamps, dependency information, and so on. You can also use them to synchronously to perform I/O in order to load media data of one or more media samples into memory.
Topics
Navigating samples
step(byDecodeTime:wasPinned:)step(byPresentationTime:wasPinned:)stepInDecodeOrder(byCount:)stepInPresentationOrder(byCount:)
Getting timestamps
Getting sample information
currentChunkInfoAVSampleCursorChunkInfocurrentChunkStorageRangeAVSampleCursorStorageRangecurrentChunkStorageURLcurrentSampleDependencyInfoAVSampleCursorDependencyInfocurrentSampleDurationcurrentSampleIndexInChunkcurrentSampleStorageRangecurrentSampleSyncInfoAVSampleCursorSyncInfocopyCurrentSampleFormatDescription()currentSampleAudioDependencyInfocurrentSampleDependencyAttachments
Accessing samples
maySamplesWithEarlierDecodeTimeStampsHavePresentationTimeStamps(laterThan:)maySamplesWithLaterDecodeTimeStampsHavePresentationTimeStamps(earlierThan:)samplesRequiredForDecoderRefresh