---
title: "pixelBufferAndDisplayTime(forItemTime:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avplayeritemvideooutput/pixelbufferanddisplaytime(foritemtime:)"
---

# pixelBufferAndDisplayTime(forItemTime:)

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

## Declaration

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

## Return Value

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

## Discussion

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

- [hasNewPixelBuffer(forItemTime:)](avfoundation/avplayeritemvideooutput/hasnewpixelbuffer(foritemtime:).md)
- [copyPixelBuffer(forItemTime:itemTimeForDisplay:)](avfoundation/avplayeritemvideooutput/copypixelbuffer(foritemtime:itemtimefordisplay:).md)
