Instance Method


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


func copyPixelBuffer(forItemTime itemTime: CMTime, itemTimeForDisplay outItemTimeForDisplay: UnsafeMutablePointer<CMTime>?) -> CVPixelBuffer?



The time at which you want to retrieve the image from the item.


The time by which you intend to use the returned pixel buffer. You may specify nil for this parameter if you do not have a specific deadline.

Return Value

A pixel buffer containing the image data to display or nil if nothing should be displayed at the specified time. The caller is responsible for calling CVBufferRelease on the returned data when it is no longer needed.


Typically, you call this method in response to a CVDisplayLink callback or a CADisplayLink delegate method call when the hasNewPixelBuffer(forItemTime:) method also returns true.

After calling this method, the video output object marks the pixel buffer data as having been acquired. This causes the hasNewPixelBuffer(forItemTime:) method to return false unless newer data becomes available.

See Also

Getting Pixel Buffer Data

func hasNewPixelBuffer(forItemTime: CMTime) -> Bool

Returns a Boolean value that indicates whether video output is available for the specified item time.