CMSampleBufferGetOutputDuration(_:)
Returns the output duration of a sample buffer.
Declaration
func CMSampleBufferGetOutputDuration(_ sbuf: CMSampleBuffer) -> CMTimeParameters
- sbuf:
The
CMSampleBufferbeing 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
CMSampleBufferGetDuration(_:)CMSampleBufferGetDecodeTimeStamp(_:)CMSampleBufferGetPresentationTimeStamp(_:)CMSampleBufferGetOutputDecodeTimeStamp(_:)CMSampleBufferGetOutputPresentationTimeStamp(_:)CMSampleBufferSetOutputPresentationTimeStamp(_:newValue:)CMSampleBufferGetSampleTimingInfo(_:at:timingInfoOut:)CMSampleBufferGetSampleTimingInfoArray(_:entryCount:arrayToFill:entriesNeededOut:)CMSampleBufferGetOutputSampleTimingInfoArray(_:entryCount:arrayToFill:entriesNeededOut:)