Function

CMSampleBufferGetDecodeTimeStamp(_:)

Returns the numerically earliest decode timestamp of all the samples in a CMSampleBuffer.

Declaration

func CMSampleBufferGetDecodeTimeStamp(_ sbuf: CMSampleBuffer) -> CMTime

Parameters

sbuf

The CMSampleBuffer being interrogated.

Return Value

The numerically earliest sample decode timestamp in the CMSampleBuffer or kCMTimeInvalid if there is an error.

Discussion

The returned decode timestamp is always the decode timestamp of the first sample in the buffer, because even out-of-presentation-order samples are expected to be in decode order in the buffer.

See Also

Inspecting Sample Buffers

func CMSampleBufferGetDataBuffer(CMSampleBuffer) -> CMBlockBuffer?

Returns a CMSampleBuffer's CMBlockBuffer of media data.

func CMSampleBufferGetDuration(CMSampleBuffer) -> CMTime

Returns the total duration of a CMSampleBuffer.

func CMSampleBufferGetFormatDescription(CMSampleBuffer) -> CMFormatDescription?

Returns the format description of the samples in a CMSampleBuffer.

func CMSampleBufferGetImageBuffer(CMSampleBuffer) -> CVImageBuffer?

Returns a sample buffer's CVImageBuffer of media data.

func CMSampleBufferGetNumSamples(CMSampleBuffer) -> CMItemCount

Returns the number of media samples in a CMSampleBuffer.

func CMSampleBufferGetOutputDecodeTimeStamp(CMSampleBuffer) -> CMTime

Returns the output decode timestamp of the CMSampleBuffer.

func CMSampleBufferGetOutputDuration(CMSampleBuffer) -> CMTime

Returns the output duration of a CMSampleBuffer.

func CMSampleBufferGetOutputPresentationTimeStamp(CMSampleBuffer) -> CMTime

Returns the output presentation timestamp of the CMSampleBuffer.

func CMSampleBufferGetPresentationTimeStamp(CMSampleBuffer) -> CMTime

Returns the numerically earliest presentation timestamp of all the samples in a CMSampleBuffer.

func CMSampleBufferGetSampleAttachmentsArray(CMSampleBuffer, createIfNecessary: Bool) -> CFArray?

Returns a reference to a CMSampleBuffer's immutable array of mutable sample attachments dictionaries (one dictionary per sample in the CMSampleBuffer).

func CMSampleBufferGetSampleSize(CMSampleBuffer, at: CMItemIndex) -> Int

Returns the size in bytes of a specified sample in a CMSampleBuffer.

func CMSampleBufferGetTotalSampleSize(CMSampleBuffer) -> Int

Returns the total size in bytes of sample data in a CMSampleBuffer.

func CMSampleBufferDataIsReady(CMSampleBuffer) -> Bool

Determines if the sample buffer's data is ready.

func CMSampleBufferIsValid(CMSampleBuffer) -> Bool

Queries whether a sample buffer is still valid.

func CMSampleBufferGetTypeID() -> CFTypeID

Returns the CFTypeID of CMSampleBuffer objects.