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

# AVAsynchronousVideoCompositionRequest

An object that contains information a video compositor needs to render an output pixel buffer.

```
class AVAsynchronousVideoCompositionRequest
```

## Overview

The video compositor must adopt the [`AVVideoCompositing`](/documentation/AVFoundation/AVVideoCompositing) protocol.

## Topics

### Inspecting the request

[`compositionTime`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/compositionTime)

A time for which to compose the frame.

[`renderContext`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/renderContext)

The rendering context of the video composition.

[`videoCompositionInstruction`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/videoCompositionInstruction)

A video composition instruction that indicates how to compose the frame.

### Accessing source data

[`attach(_:to:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/attach(_:to:))

Associates the pixel buffer with the specified spatial configuration.

[`attachSpatialVideoConfiguration:toPixelBuffer:`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/attachSpatialVideoConfiguration:toPixelBuffer:)

Associates the pixel buffer with the specified spatial configuration.

[`sourceFrame(byTrackID:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceFrame(byTrackID:))

Returns a source pixel buffer for the track that contains the specified identifier.

[`sourceReadOnlyPixelBuffer(byTrackID:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceReadOnlyPixelBuffer(byTrackID:))

Returns the source CVReadOnlyPixelBuffer for the given track ID.
If the track contains tagged buffers, a pixel buffer from one of the tagged buffers will be returned.

[`sourceReadySampleBuffer(byTrackID:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceReadySampleBuffer(byTrackID:))

Returns the source CMReadySampleBuffer for the given track ID.

[`sourceSampleBuffer(byTrackID:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceSampleBuffer(byTrackID:))

Returns a source sample buffer for the track that contains the specified identifier.

[`sourceSampleDataTrackIDs`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceSampleDataTrackIDs-3yiab)

The identifiers of tracks that contain source sample data.

[`sourceSampleDataTrackIDs`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceSampleDataTrackIDs-9vxz5)

The identifiers of tracks that contain source metadata.

[`sourceTaggedBufferGroupByTrackID:`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceTaggedBufferGroupByTrackID:)

Returns the source CMTaggedBufferGroupRef for the given track ID.

[`sourceTaggedDynamicBuffers(byTrackID:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceTaggedDynamicBuffers(byTrackID:))

Returns the source tagged dynamic buffers for the given track ID.
Returns nil if the video track does not contain tagged buffers, or if the track does not contain video. This function should only be called when supportsSourceTaggedBuffers is YES.

[`sourceTimedMetadata(byTrackID:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceTimedMetadata(byTrackID:))

Returns a source timed metadata group for the track that contains the specified identifier.

[`sourceTrackIDs`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceTrackIDs)

The identifiers of tracks that contain source video.

### Finishing the request

[`finish(withComposedVideoFrame:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/finish(withComposedVideoFrame:))

Finishes the request to compose the frame.

[`finish(withComposedPixelBuffer:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/finish(withComposedPixelBuffer:))

The method that the custom compositor calls when composition succeeds.

[`finish(withComposedTaggedBuffers:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/finish(withComposedTaggedBuffers:))

The method that the custom compositor calls when composition succeeds.

[`finishWithComposedTaggedBufferGroup:`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/finishWithComposedTaggedBufferGroup:)

The method that the custom compositor calls when composition succeeds.

[`finish(with:)`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/finish(with:))

Finishes the request with an error.

[`finishCancelledRequest()`](/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/finishCancelledRequest())

Cancels the request to compose a video frame.



---

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)