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

# AVSampleBufferGeneratorBatch

An object that generates sample buffers in a batch.

```
class AVSampleBufferGeneratorBatch
```

## Overview

The benefit of batching is it aggregates adjacent I/O requests and overlaps them when possible for all sample buffers within the batch.

## Topics

### Preparing a batch

[`makeDataReady(completionHandler:)`](/documentation/AVFoundation/AVSampleBufferGeneratorBatch/makeDataReady(completionHandler:))

Loads sample data asynchronously for all sample buffers within a batch.

### Canceling a batch

[`cancel()`](/documentation/AVFoundation/AVSampleBufferGeneratorBatch/cancel())

Cancels any I/O for this batch.



---

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)