Instance Method

comparePositionInDecodeOrder(withPositionOf:)

Compares the relative positions of two sample cursors and returns their relative positions.

Declaration

func comparePositionInDecodeOrder(withPositionOf cursor: AVSampleCursor) -> ComparisonResult

Parameters

cursor

An instance of AVSampleCursor with which to compare positions.

Return Value

Returns CFComparisonResult.compareLessThan, CFComparisonResult.compareEqualTo or CFComparisonResult.compareGreaterThan, depending on whether the receiver points at a sample before, the same as, or after the sample pointed to by the cursor.

Discussion

If the receiver and cursor reference different sequences of samples, as when they're created by different instances of AVAssetTrack, results are undefined.