---
title: "VTFrameSiloAddSampleBuffer(_:sampleBuffer:)"
framework: videotoolbox
role: symbol
role_heading: Function
path: "videotoolbox/vtframesiloaddsamplebuffer(_:samplebuffer:)"
---

# VTFrameSiloAddSampleBuffer(_:sampleBuffer:)

Adds a sample buffer to a frame silo object.

## Declaration

```swift
func VTFrameSiloAddSampleBuffer(_ silo: VTFrameSilo, sampleBuffer: CMSampleBuffer) -> OSStatus
```

## Parameters

- `silo`: The frame silo object.
- `sampleBuffer`: The sample buffer to add to the frame silo.

## Return Value

Return Value kVTFrameSiloInvalidTimeRangeErr if an attempt is made to add a sample buffer with an inappropriate decode timestamp.

## Discussion

Discussion Within each pass, sample buffers must have strictly increasing decode timestamps. Passes after the first pass begin with a call to VTFrameSiloSetTimeRangesForNextPass(_:timeRangeCount:timeRangeArray:). After a call to VTFrameSiloSetTimeRangesForNextPass(_:timeRangeCount:timeRangeArray:), sample buffer decode timestamps must also be within the stated time ranges. Note that time ranges are considered to contain their start times but not their end times.

## See Also

### Configuring Frame Silos

- [VTFrameSiloSetTimeRangesForNextPass(_:timeRangeCount:timeRangeArray:)](videotoolbox/vtframesilosettimerangesfornextpass(_:timerangecount:timerangearray:).md)
- [VTFrameSiloCallBlockForEachSampleBuffer(_:in:handler:)](videotoolbox/vtframesilocallblockforeachsamplebuffer(_:in:handler:).md)
- [VTFrameSiloCallFunctionForEachSampleBuffer(_:in:refcon:callback:)](videotoolbox/vtframesilocallfunctionforeachsamplebuffer(_:in:refcon:callback:).md)
