Contents

CMSampleBufferGetOutputDuration(_:)

Returns the output duration of a sample buffer.

Declaration

func CMSampleBufferGetOutputDuration(_ sbuf: CMSampleBuffer) -> CMTime

Parameters

  • sbuf:

    The CMSampleBuffer being interrogated.

Return Value

The output duration of the CMSampleBuffer or kCMTimeInvalid if there is an error.

Discussion

The output duration is the duration minus any trimmed duration, all divided by the speed multiplier:

(Duration - TrimDurationAtStart - TrimDurationAtEnd) / SpeedMultiplier

See Also

Inspecting Duration and Timing