Instance Method

samplePresentationTime(forTrackTime:)

Maps the specified track time through the appropriate time mapping and returns the resulting sample presentation time.

Declaration

func samplePresentationTime(forTrackTime trackTime: CMTime) -> CMTime

Parameters

trackTime

The track time for which a sample presentation time is requested.

Return Value

The sample presentation time corresponding to trackTime; the value will be invalid if trackTime is out of range.

See Also

Finding Track Segments

var segments: [AVAssetTrackSegment]

The time mappings from the track’s media samples to its timeline.

func segment(forTrackTime: CMTime) -> AVAssetTrackSegment?

Returns the track segment that corresponds with, or is closest to, the specified track time.