<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 10.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/VTFrameSiloAddSampleBuffer(_:sampleBuffer:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Video Toolbox"
    ],
    "preciseIdentifier" : "c:@F@VTFrameSiloAddSampleBuffer"
  },
  "title" : "VTFrameSiloAddSampleBuffer(_:sampleBuffer:)"
}
-->

# VTFrameSiloAddSampleBuffer(_:sampleBuffer:)

Adds a sample buffer to a frame silo object.

```
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

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

## 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:)`](/documentation/VideoToolbox/VTFrameSiloSetTimeRangesForNextPass(_:timeRangeCount:timeRangeArray:)).

After a call to [`VTFrameSiloSetTimeRangesForNextPass(_:timeRangeCount:timeRangeArray:)`](/documentation/VideoToolbox/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.

---

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)