<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVSampleBufferVideoRenderer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSampleBufferVideoRenderer"
  },
  "title" : "AVSampleBufferVideoRenderer"
}
-->

# AVSampleBufferVideoRenderer

An object that enqueues video sample buffers for rendering.

```
class AVSampleBufferVideoRenderer
```

## Topics

### Flushing the renderer

[`requiresFlushToResumeDecoding`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/requiresFlushToResumeDecoding)

A Boolean value that Indicates whether the renderer requires flushing to continue decoding frames.

[`requiresFlushToResumeDecodingDidChangeNotification`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/requiresFlushToResumeDecodingDidChangeNotification)

A notification that indicates that the video renderer requires flushing to continue rendering sample buffers.

[`AVSampleBufferVideoRendererRequiresFlushToResumeDecodingDidChangeNotificationRequiresFlushKey`](/documentation/AVFoundation/AVSampleBufferVideoRendererRequiresFlushToResumeDecodingDidChangeNotificationRequiresFlushKey)

[`flush(removingDisplayedImage:completionHandler:)`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/flush(removingDisplayedImage:completionHandler:))

Tells the video renderer to discard pending enqueued sample buffers.

### Setting presentation time expectations

[`presentationTimeExpectation`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/presentationTimeExpectation-swift.property)

[`expectMinimumUpcomingSampleBufferPresentationTime:`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/expectMinimumUpcomingSampleBufferPresentationTime:)

[`expectMonotonicallyIncreasingUpcomingSampleBufferPresentationTimes`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/expectMonotonicallyIncreasingUpcomingSampleBufferPresentationTimes)

[`resetUpcomingSampleBufferPresentationTimeExpectations`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/resetUpcomingSampleBufferPresentationTimeExpectations)

[`AVSampleBufferVideoRenderer.PresentationTimeExpectation`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/PresentationTimeExpectation-swift.enum)

Options that specify the expected presentation time stamps of enqueue samples.

### Inspecting the status

[`status`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/status)

A status value that indicates whether this object can enqueue and render sample buffers.

[`error`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/error)

An object the describes the error that caused the rendering failure.

### Accessing the pixel buffer

[`displayedPixelBuffer()`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/displayedPixelBuffer())

[`recommendedPixelBufferAttributes`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/recommendedPixelBufferAttributes-6326f)

Recommended pixel buffer attributes for optimal performance when using CMSampleBuffers containing CVPixelBuffers.   

[`recommendedPixelBufferAttributes`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/recommendedPixelBufferAttributes-6zrqb)

Recommended pixel buffer attributes for optimal performance when using CMSampleBuffers containing CVPixelbuffers.   

### Handling decode failures

[`didFailToDecodeNotification`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/didFailToDecodeNotification)

A notification that indicates the video renderer fails to decode a sample buffer.

[`didFailToDecodeNotificationErrorKey`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/didFailToDecodeNotificationErrorKey)

A key to retrieve an error object that provides the details of the failure.

### Capturing performance metrics

[`loadVideoPerformanceMetrics(completionHandler:)`](/documentation/AVFoundation/AVSampleBufferVideoRenderer/loadVideoPerformanceMetrics(completionHandler:))



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)