<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 18.2.0 -",
    "macOS: 12.3.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScreenCaptureKit",
  "identifier" : "/documentation/ScreenCaptureKit/SCStream/addStreamOutput(_:type:sampleHandlerQueue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ScreenCaptureKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCStream(im)addStreamOutput:type:sampleHandlerQueue:error:"
  },
  "title" : "addStreamOutput(_:type:sampleHandlerQueue:)"
}
-->

# addStreamOutput(_:type:sampleHandlerQueue:)

Adds a destination that receives the stream output.

```
func addStreamOutput(_ output: any SCStreamOutput, type: SCStreamOutputType, sampleHandlerQueue: dispatch_queue_t?) throws
```

## Parameters

`output`

The object that conforms to the stream output protocol.

`type`

The stream output type.

`sampleHandlerQueue`

The queue that receives the stream output.

## Discussion

Use this method to attach an object that conforms to [`SCStreamOutput`](/documentation/ScreenCaptureKit/SCStreamOutput) to receive stream content. Optionally, provide a <doc://com.apple.documentation/documentation/Dispatch/DispatchQueue> to send output to a queue that’s responsible for processing the output.

---

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)