---
title: "sourceReadySampleBuffer(byTrackID:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avasynchronousvideocompositionrequest/sourcereadysamplebuffer(bytrackid:)"
---

# sourceReadySampleBuffer(byTrackID:)

Returns the source CMReadySampleBuffer for the given track ID.

## Declaration

```swift
func sourceReadySampleBuffer(byTrackID trackID: CMPersistentTrackID) -> CMReadySampleBuffer<CMSampleBuffer.DynamicContent>?
```

## Parameters

- `trackID`: The track ID for the requested source frame.

## Return Value

Return Value The source CMReadySampleBuffer for the given track ID.

## See Also

### Accessing source data

- [attach(_:to:)](avfoundation/avasynchronousvideocompositionrequest/attach(_:to:).md)
- [sourceFrame(byTrackID:)](avfoundation/avasynchronousvideocompositionrequest/sourceframe(bytrackid:).md)
- [sourceReadOnlyPixelBuffer(byTrackID:)](avfoundation/avasynchronousvideocompositionrequest/sourcereadonlypixelbuffer(bytrackid:).md)
- [sourceSampleBuffer(byTrackID:)](avfoundation/avasynchronousvideocompositionrequest/sourcesamplebuffer(bytrackid:).md)
- [sourceSampleDataTrackIDs](avfoundation/avasynchronousvideocompositionrequest/sourcesampledatatrackids-3yiab.md)
- [sourceTaggedDynamicBuffers(byTrackID:)](avfoundation/avasynchronousvideocompositionrequest/sourcetaggeddynamicbuffers(bytrackid:).md)
- [sourceTimedMetadata(byTrackID:)](avfoundation/avasynchronousvideocompositionrequest/sourcetimedmetadata(bytrackid:).md)
- [sourceTrackIDs](avfoundation/avasynchronousvideocompositionrequest/sourcetrackids.md)
