<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: 18.2.0 -",
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScreenCaptureKit",
  "identifier" : "/documentation/ScreenCaptureKit/SCScreenshotManager/captureSampleBuffer(contentFilter:configuration:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "ScreenCaptureKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCScreenshotManager(cm)captureSampleBufferWithFilter:configuration:completionHandler:"
  },
  "title" : "captureSampleBuffer(contentFilter:configuration:completionHandler:)"
}
-->

# captureSampleBuffer(contentFilter:configuration:completionHandler:)

Captures a single frame directly from a stream’s buffer, using a filter.

```
class func captureSampleBuffer(contentFilter: SCContentFilter, configuration config: SCStreamConfiguration, completionHandler: (@Sendable (CMSampleBuffer?, (any Error)?) -> Void)? = nil)
```

## Parameters

`contentFilter`

The content filter used to select the stream.

`config`

Configuration information for how to record the stream buffer.

`completionHandler`

Closure that processes the capture taken from streaming content.

## Discussion

---

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)