Contents

pixelBufferAndDisplayTime(forItemTime:)

Retrieves an image that is appropriate for display at the specified item time, and marks the image as acquired

Declaration

func pixelBufferAndDisplayTime(forItemTime itemTime: CMTime) -> (pixelBuffer: CVReadOnlyPixelBuffer?, itemTimeForDisplay: CMTime)

Return Value

A tuple containing the image to be displayed and a CMTime representing the true display deadline for the pixel buffer

Discussion

  • itemTime: A CMTime that expresses a desired item time

Typically you would call this method in response to a CADisplayLink delegate invocation and if hasNewPixelBuffer(forItemTime:) also returns true.

The buffer retrieved from pixelBufferAndDisplayTime(forItemTime:) may itself be nil. A nil pixel buffer communicates that nothing should be displayed for the supplied item time.

See Also

Getting pixel buffer data